Production Ready Macros for SAS Application Developers
https://github.com/sasjs/core
mp_jsonout.test.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Testing mp_jsonout.sas macro
4
5 <h4> SAS Macros </h4>
6 @li mp_jsonout.sas
7 @li mp_assert.sas
8
9**/
10
11filename webref temp;
12
13data demo;
14 dtval=date();
15 format dtval date9.;
16 compare=put(date(),date9.);
17 call symputx('compare',compare);
18run;
19
20%mp_jsonout(OPEN,jref=webref)
21%mp_jsonout(OBJ,demo,jref=webref,fmt=Y)
22%mp_jsonout(CLOSE,jref=webref)
23
24data _null_;
25 infile webref;
26 input;
27 putlog _infile_;
28run;
29
30libname web JSON fileref=webref;
31%let dtval=0;
32data work.test;
33 set web.demo;
34 call symputx('dtval',dtval);
35run;
36
37
38%mp_assert(
39 iftrue=(&dtval=&compare),
40 desc=Checking tables were created successfully,
41 outds=work.test_results
42)