Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
ms_creategroup.test.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Testing ms_creategroup.sas macro
4
5 <h4> SAS Macros </h4>
6 @li mf_getuniquename.sas
7 @li mp_assert.sas
8 @li mp_assertscope.sas
9 @li ms_creategroup.sas
10 @li ms_getgroups.sas
11
12**/
13
14%let group=%substr(%mf_getuniquename(),1,8);
15
16%mp_assertscope(SNAPSHOT)
17%ms_creategroup(&group, desc=The description,mdebug=&sasjs_mdebug,outds=test1)
18%mp_assertscope(COMPARE
19 ,ignorelist=MCLIB0_JADP1LEN MCLIB0_JADPNUM MCLIB0_JADVLEN MC0_JADP1LEN
20 MC0_JADPNUM MC0_JADVLEN
21)
22
23%let id=0;
24data _null_;
25 set work.test1;
26 call symputx('id',groupid);
27run;
28%mp_assert(
29 iftrue=(&id>0),
30 desc=Checking that group was created with an ID,
31 outds=work.test_results
32)
33
34/* double check by querying the list of users */
35%ms_getgroups(outds=work.test2)
36%let checkid=0;
37data _null_;
38 set work.test2;
39 where upcase(name)="%upcase(&group)";
40 call symputx('checkid',groupid);
41run;
42%mp_assert(
43 iftrue=(&checkid=&id),
44 desc=Checking that fetched group exists and has the same ID,
45 outds=work.test_results
46)
47
48
49
50
51