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_nobs.sas
10 @li mf_getuser.sas
11 @li mp_assert.sas
12 @li mx_getgroups.sas
13
14**/
15
16
17%mx_getgroups(outds=work.test1)
18
19%mp_assert(
20 iftrue=(%mf_nobs(work.test1)>0),
21 desc=groups were found,
22 outds=work.test_results
23)
24%mp_assertcols(work.test1,
25 cols=groupuri groupname groupdesc,
26 test=ALL,
27 desc=check all columns exist
28)
29
30%mx_getgroups(outds=work.test2,user=%mf_getuser())
31
32%mp_assert(
33 iftrue=(%mf_nobs(work.test2)>0),
34 desc=groups for current user were found,
35 outds=work.test_results
36)
37%mp_assertcols(work.test2,
38 cols=groupuri groupname groupdesc,
39 test=ALL,
40 desc=check all columns exist
41)