Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mp_jsonout.test.3.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Testing mp_jsonout.sas macro with non-standard chars
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 do x='"','0A'x,'0D'x,'09'x,'00'x,'0E'x,'0F'x,'01'x,'02'x,'10'x,'11'x,'\';
15 output;
16 end;
17run;
18%mp_jsonout(OPEN,jref=webref)
19%mp_jsonout(OBJ,demo,jref=webref)
20%mp_jsonout(CLOSE,jref=webref)
21
22data _null_;
23 infile webref;
24 input;
25 putlog _infile_;
26run;
27
28libname web JSON fileref=webref;
29
30%mp_assert(
31 iftrue=(&syscc=0),
32 desc=Checking for error condition with special chars export,
33 outds=work.test_results
34)
35
36/*
37data _null_;
38 set work.demo (in=start) web.demo (in=end);
39 put (_all_)(=);
40run;
41proc sql;
42describe table work.demo;
43describe table web.demo;
44*/
45
46proc compare base=work.demo compare=web.demo(keep=x);
47quit;
48
49%mp_assert(
50 iftrue=(&sysinfo=0),
51 desc=Returned json is identical to input table for all special chars,
52 outds=work.test_results
53)