Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mv_webout.test.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Testing mv_webout macro
4
5 <h4> SAS Macros </h4>
6 @li mf_getuniquefileref.sas
7 @li mv_webout.sas
8 @li mp_assert.sas
9 @li mp_assertdsobs.sas
10
11**/
12
13
14/* testing FETCHing (WEB approach) */
15
16data _null_;
17 call symputx('sasjs1data','area:$char4.'!!'0d0a'x!!'Adak');
18 call symputx('sasjs_tables','areas');
19run;
20%put &=sasjs1data;
21
22%mv_webout(FETCH)
23
24%mp_assertdsobs(work.areas,
25 desc=Test input table has 1 row,
26 test=EQUALS 1,
27 outds=work.test_results
28)
29
30
31%let fref=%mf_getuniquefileref();
32%global _metaperson;
33data some datasets;
34 x=1;
35run;
36%mv_webout(OPEN,fref=&fref,stream=N)
37%mv_webout(ARR,some,fref=&fref,stream=N)
38%mv_webout(OBJ,datasets,fref=&fref,stream=N)
39%mv_webout(CLOSE,fref=&fref,stream=N)
40
41data _null_;
42 infile &fref;
43 input;
44 putlog _infile_;
45run;
46
47libname test JSON (&fref);
48data root;
49 set test.root;
50 call symputx('checkval',sysvlong);
51run;
52data alldata;
53 set test.alldata;
54run;
55
56%mp_assert(
57 iftrue=(%str(&checkval)=%str(&sysvlong)),
58 desc=Check if the sysvlong value was created
59)