Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mp_cntlout.test.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Testing mp_cntlout.sas macro
4
5 <h4> SAS Macros </h4>
6 @li mf_nobs.sas
7 @li mddl_sas_cntlout.sas
8 @li mp_cntlout.sas
9 @li mp_assert.sas
10 @li mp_assertmodel.sas
11 @li mp_assertscope.sas
12
13**/
14
15libname perm (work);
16data work.loadfmts;
17 length fmtname $32;
18 eexcl='Y';
19 type='N';
20 do i=1 to 100;
21 fmtname=cats('SASJS_',i,'X');
22 do j=1 to 100;
23 start=cats(j);
24 end=cats(j+1);
25 label= cats('Dummy ',start);
26 output;
27 end;
28 end;
29run;
30proc format cntlin=work.loadfmts library=perm.testcat;
31run;
32
33%mp_assertscope(SNAPSHOT)
34%mp_cntlout(libcat=perm.testcat,cntlout=work.cntlout)
35%mp_assertscope(COMPARE)
36
37%mddl_sas_cntlout(libds=work.cntlout_model)
38%mp_assertmodel(work.cntlout,base=work.cntlout_model,key=type fmtname fmtrow,
39 desc=Checking CNTLOUT model and key)
40
41%mp_assert(
42 iftrue=(%mf_nobs(work.cntlout)=10000),
43 desc=Checking first hash diff,
44 outds=work.test_results
45)