Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mp_ds2squeeze.test.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Testing mp_ds2squeeze.sas macro
4
5 <h4> SAS Macros </h4>
6 @li mf_getvarlen.sas
7 @li mp_assert.sas
8 @li mp_assertscope.sas
9 @li mp_ds2squeeze.sas
10
11**/
12
13data big;
14 length my big $32000;
15 do i=1 to 1e4;
16 my=repeat('oh my',100);
17 big='dawg';
18 special=._;
19 missn=.;
20 missc='';
21 output;
22 end;
23run;
24
25%mp_assertscope(SNAPSHOT)
26%mp_ds2squeeze(work.big,outds=work.smaller)
27%mp_assertscope(COMPARE)
28
29%mp_assert(
30 iftrue=(&syscc=0),
31 desc=Checking syscc
32)
33%mp_assert(
34 iftrue=(%mf_getvarlen(work.smaller,missn)=3),
35 desc=Check missing numeric is 3
36)
37%mp_assert(
38 iftrue=(%mf_getvarlen(work.smaller,special)=3),
39 desc=Check missing special numeric is 3
40)
41%mp_assert(
42 iftrue=(%mf_getvarlen(work.smaller,missc)=1),
43 desc=Check missing char is 1
44)