@sasjs/core 4.29.0 → 4.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -35,5 +35,5 @@
35
35
  "devDependencies": {
36
36
  "@sasjs/cli": "3.13.0"
37
37
  },
38
- "version": "4.29.0"
38
+ "version": "4.30.0"
39
39
  }
@@ -9,12 +9,17 @@
9
9
 
10
10
  %ms_getgroups(outds=userlist)
11
11
 
12
- With filter:
12
+ With filter on username:
13
13
 
14
14
  %ms_getgroups(outds=userlist, user=James)
15
15
 
16
+ With filter on userid:
17
+
18
+ %ms_getgroups(outds=userlist, uid=1)
19
+
16
20
  @param [in] mdebug= (0) Set to 1 to enable DEBUG messages
17
21
  @param [in] user= (0) Provide the username on which to filter
22
+ @param [in] uid= (0) Provide the userid on which to filter
18
23
  @param [out] outds= (work.ms_getgroups) This output dataset will contain the
19
24
  list of groups. Format:
20
25
  |NAME:$32.|DESCRIPTION:$64.|GROUPID:best.|
@@ -37,6 +42,7 @@
37
42
 
38
43
  %macro ms_getgroups(
39
44
  user=0,
45
+ uid=0,
40
46
  outds=work.ms_getgroups,
41
47
  mdebug=0
42
48
  );
@@ -86,8 +92,10 @@ run;
86
92
  run;
87
93
  %end;
88
94
 
89
- %if "&user"="0" %then %let url=/SASjsApi/group;
90
- %else %let url=/SASjsApi/user/by/username/&user;
95
+ %if "&user" ne "0" %then %let url=/SASjsApi/user/by/username/&user;
96
+ %else %if "&uid" ne "0" %then %let url=/SASjsApi/user/&uid;
97
+ %else %let url=/SASjsApi/group;
98
+
91
99
 
92
100
  proc http method='GET' headerin=&fref0 out=&fref1
93
101
  url="&_sasjs_apiserverurl.&url";
@@ -104,7 +112,7 @@ run;
104
112
 
105
113
  libname &libref JSON fileref=&fref1;
106
114
 
107
- %if "&user"="0" %then %do;
115
+ %if "&user"="0" and "&uid"="0" %then %do;
108
116
  data &outds;
109
117
  length NAME $32 DESCRIPTION $64. GROUPID 8;
110
118
  if _n_=1 then call missing(of _all_);