22%mp_assertscope(SNAPSHOT)
23%mp_ds2csv(work.somedata,outfile=
"&sasjswork/test1.csv")
24%mp_assertscope(COMPARE)
28 infile
"&sasjswork/test1.csv";
31 if _n_=1 then call symputx(
'test1a',_infile_);
32 else if _infile_=:
'1," t""w""o",.Z' then call symputx(
'test1b',
'PASS');
36 iftrue=(
"&test1a"=
"x factor, Y, Z"),
37 desc=Checking header row Test 1,
38 outds=work.test_results
41 iftrue=(
"&test1b"=
"PASS"),
42 desc=Checking data row Test 1,
43 outds=work.test_results
49filename test2 "&sasjswork/test2.csv";
50%mp_ds2csv(work.somedata,outref=test2,dlm=SEMICOLON,headerformat=NAME)
57 if _n_=1 then call symputx('test2a',_infile_);
58 else if _infile_=:'1;" t""w""o";.Z' then call symputx('test2b','PASS');
62 iftrue=("&test2a"="X; Y; Z"),
63 desc=Checking header row Test 2,
64 outds=work.test_results
67 iftrue=("&test2b"="PASS"),
68 desc=Checking data row Test 2,
69 outds=work.test_results
75filename test3 "&sasjswork/test3.csv";
76%mp_ds2csv(work.somedata,outref=test3,headerformat=SASJS)
83 if _n_=1 then call symputx('test3a',_infile_);
84 else if _infile_=:'1," t""w""o",.Z' then call symputx('test3b','PASS');
88 iftrue=("&test3a"="X:best. Y:$char7. Z:best."),
89 desc=Checking header row Test 3,
90 outds=work.test_results
93 iftrue=("&test3b"="PASS"),
94 desc=Checking data row Test 3,
95 outds=work.test_results
100%mp_ds2csv(sashelp.air,outref=example,headerformat=SASJS)
101data _null_; infile example; input;put _infile_; if _n_>5 then stop;run;
106 call symputx('stmnt',_infile_);
110 infile example dsd firstobs=2;
116 desc=Checking syscc prior to compare of sashelp.air,
117 outds=work.test_results
120proc compare base=want compare=sashelp.air;
123 iftrue=(&sysinfo le 41),
124 desc=Checking compare of sashelp.air,
125 outds=work.test_results
135 format x date9. y datetime19. z time.;
137%mp_ds2csv(work.test5,outref=f2,headerformat=SASJS)
138data _null_; infile example; input;put _infile_; if _n_>5 then stop;run;
144 call symputx('stmnt2',_infile_);
148 infile f2 dsd firstobs=2;
155 desc=Checking syscc prior to compare of test5,
156 outds=work.test_results
159proc compare base=want5 compare=work.test5;
162 iftrue=(&sysinfo le 41),
163 desc=Checking compare of work.test5,
164 outds=work.test_results