1
0
mirror of https://github.com/sasjs/core.git synced 2026-01-06 09:00:06 +00:00

feat: mp_ds2inserts macro for creating programs for inserting data (and corresponding test)

This commit is contained in:
Allan Bowe
2021-07-26 19:04:49 +03:00
parent 154a33434e
commit e3205ec06c
2 changed files with 146 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
/**
@file
@brief Testing mp_ds2inserts.sas macro
<h4> SAS Macros </h4>
@li mp_ds2inserts.sas
@li mp_assert.sas
**/
/**
* test 1 - rebuild an existing dataset
* Cars is a great dataset - it contains leading spaces, and formatted numerics
*/
%mp_ds2inserts(sashelp.cars,outref=testref,outlib=work,outds=test)
data work.test;
set sashelp.cars;
stop;
proc sql;
%inc testref;
proc compare base=sashelp.cars compare=work.test;
quit;
%mp_assert(
iftrue=(&sysinfo=1),
desc=sashelp.cars is identical except for ds label,
outds=work.test_results
)