1
0
mirror of https://github.com/sasjs/core.git synced 2025-12-10 14:04:36 +00:00
Files
core/tests/base/mp_jsonout.test.1.sas
munja 512f05c0b2 feat: creating new mx_ suite of macros!
also adding new mx_getcode macro
2022-05-19 22:02:19 +01:00

47 lines
764 B
SAS

/**
@file
@brief Testing mp_jsonout.sas macro
<h4> SAS Macros </h4>
@li mp_jsonout.sas
@li mp_assert.sas
**/
filename webref temp;
data demo;
dtval=date();
format dtval date9.;
compare=put(date(),date9.);
call symputx('compare',compare);
run;
%mp_jsonout(OPEN,jref=webref)
%mp_jsonout(OBJ,demo,jref=webref,fmt=Y)
%mp_jsonout(CLOSE,jref=webref)
data _null_;
infile webref;
input;
putlog _infile_;
run;
libname web JSON fileref=webref;
%let dtval=0;
data work.test;
set web.demo;
call symputx('dtval',dtval);
run;
%mp_assert(
iftrue=(&syscc=0),
desc=Checking for error condition,
outds=work.test_results
)
%mp_assert(
iftrue=(&dtval=&compare),
desc=Checking tables were created successfully,
outds=work.test_results
)