Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mx_getgroups.test.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Testing mx_getgroups.test.sas macro
4
5 Be sure to run <code>%let mcTestAppLoc=/Public/temp/macrocore;</code> when
6 running in Studio
7
8 <h4> SAS Macros </h4>
9 @li mf_getuser.sas
10 @li mf_nobs.sas
11 @li mp_assert.sas
12 @li mp_assertcols.sas
13 @li mx_getgroups.sas
14
15**/
16
17
18%mx_getgroups(outds=work.test1)
19
20%mp_assert(
21 iftrue=(%mf_nobs(work.test1)>0),
22 desc=groups were found,
23 outds=work.test_results
24)
25%mp_assertcols(work.test1,
26 cols=groupuri groupname groupdesc,
27 test=ALL,
28 desc=check all columns exist
29)
30
31%mx_getgroups(outds=work.test2,user=%mf_getuser())
32
33%mp_assert(
34 iftrue=(%mf_nobs(work.test2)>0),
35 desc=groups for current user were found,
36 outds=work.test_results
37)
38%mp_assertcols(work.test2,
39 cols=groupuri groupname groupdesc,
40 test=ALL,
41 desc=check all columns exist
42)