@sasjs/core 4.30.4 → 4.31.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/meta/mm_getusers.sas +46 -19
- package/package.json +1 -1
package/meta/mm_getusers.sas
CHANGED
|
@@ -8,17 +8,18 @@
|
|
|
8
8
|
|
|
9
9
|
%mm_getusers()
|
|
10
10
|
|
|
11
|
+
Optionally, filter for a user (useful to get the uri):
|
|
12
|
+
|
|
13
|
+
%mm_getusers(user=&_metaperson)
|
|
14
|
+
|
|
11
15
|
@param outds the dataset to create that contains the list of libraries
|
|
12
16
|
|
|
13
17
|
@returns outds dataset containing all users, with the following columns:
|
|
14
18
|
- uri
|
|
15
19
|
- name
|
|
16
20
|
|
|
17
|
-
@
|
|
18
|
-
|
|
19
|
-
filename sxlemap clear;
|
|
20
|
-
filename response clear;
|
|
21
|
-
libname _XML_ clear;
|
|
21
|
+
@param user= (0) Set to a metadata user to filter on that user
|
|
22
|
+
@param outds= (work.mm_getusers) The output table to create
|
|
22
23
|
|
|
23
24
|
@version 9.3
|
|
24
25
|
@author Allan Bowe
|
|
@@ -26,23 +27,49 @@
|
|
|
26
27
|
**/
|
|
27
28
|
|
|
28
29
|
%macro mm_getusers(
|
|
29
|
-
outds=work.mm_getusers
|
|
30
|
+
outds=work.mm_getusers,
|
|
31
|
+
user=0
|
|
30
32
|
)/*/STORE SOURCE*/;
|
|
31
33
|
|
|
32
34
|
filename response temp;
|
|
33
|
-
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
35
|
+
%if %superq(user)=0 %then %do;
|
|
36
|
+
proc metadata in= '<GetMetadataObjects>
|
|
37
|
+
<Reposid>$METAREPOSITORY</Reposid>
|
|
38
|
+
<Type>Person</Type>
|
|
39
|
+
<NS>SAS</NS>
|
|
40
|
+
<Flags>0</Flags>
|
|
41
|
+
<Options>
|
|
42
|
+
<Templates>
|
|
43
|
+
<Person Name=""/>
|
|
44
|
+
</Templates>
|
|
45
|
+
</Options>
|
|
46
|
+
</GetMetadataObjects>'
|
|
47
|
+
out=response;
|
|
48
|
+
run;
|
|
49
|
+
%end;
|
|
50
|
+
%else %do;
|
|
51
|
+
filename inref temp;
|
|
52
|
+
data _null_;
|
|
53
|
+
file inref;
|
|
54
|
+
put "<GetMetadataObjects>";
|
|
55
|
+
put "<Reposid>$METAREPOSITORY</Reposid>";
|
|
56
|
+
put "<Type>Person</Type>";
|
|
57
|
+
put "<NS>SAS</NS>";
|
|
58
|
+
put "<!-- Specify the OMI_XMLSELECT (128) flag -->";
|
|
59
|
+
put "<Flags>128</Flags>";
|
|
60
|
+
put "<Options>";
|
|
61
|
+
put "<Templates>";
|
|
62
|
+
put '<Person Name=""/>';
|
|
63
|
+
put "</Templates>";
|
|
64
|
+
length string $10000;
|
|
65
|
+
string=cats('<XMLSELECT search="Person[@Name=',"'&user'",']"/>');
|
|
66
|
+
put string;
|
|
67
|
+
put "</Options>";
|
|
68
|
+
put "</GetMetadataObjects>";
|
|
69
|
+
run;
|
|
70
|
+
proc metadata in=inref out=response;
|
|
71
|
+
run;
|
|
72
|
+
%end;
|
|
46
73
|
|
|
47
74
|
filename sxlemap temp;
|
|
48
75
|
data _null_;
|
package/package.json
CHANGED