Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mp_assertdsobs.test.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Testing mp_assertdsobs.sas macro
4
5 <h4> SAS Macros </h4>
6 @li mp_assertdsobs.sas
7 @li mp_assertcolvals.sas
8
9**/
10
11
12data work.somedata;
13 do x=1 to 15;
14 output;
15 end;
16run;
17
18%mp_assertdsobs(work.somedata,
19 test=ATLEAST 15,
20 outds=work.test_the_test
21)
22
23%mp_assertdsobs(work.somedata,
24 test=ATMOST 15,
25 outds=work.test_the_test
26)
27
28data work.check;
29 val='PASS';
30run;
31%mp_assertcolvals(work.test_the_test.test_result,
32 checkvals=work.check.val,
33 desc=Testing ATLEAST / ATMOST for passes,
34 test=ALLVALS
35)
36
37%mp_assertdsobs(work.somedata,
38 test=ATLEAST 16,
39 outds=work.test_the_test2
40)
41%mp_assertdsobs(work.somedata,
42 test=ATMOST 14,
43 outds=work.test_the_test2
44)
45
46data _null_;
47 set work.test_the_test2;
48 putlog (_all_)(=);
49run;
50
51data work.check2;
52 val='FAIL';
53run;
54%mp_assertcolvals(work.test_the_test2.test_result,
55 checkvals=work.check2.val,
56 desc=Testing ATLEAST / ATMOST for failures,
57 test=ALLVALS
58)
59
60