diff --git a/all.sas b/all.sas index 4fb9750..536f8de 100644 --- a/all.sas +++ b/all.sas @@ -17783,17 +17783,18 @@ libname _XML_ clear; %mm_getusers() + Optionally, filter for a user (useful to get the uri): + + %mm_getusers(user=&_metaperson) + @param outds the dataset to create that contains the list of libraries @returns outds dataset containing all users, with the following columns: - uri - name - @warning The following filenames are created and then de-assigned: - - filename sxlemap clear; - filename response clear; - libname _XML_ clear; + @param user= (0) Set to a metadata user to filter on that user + @param outds= (work.mm_getusers) The output table to create @version 9.3 @author Allan Bowe @@ -17801,23 +17802,44 @@ libname _XML_ clear; **/ %macro mm_getusers( - outds=work.mm_getusers + outds=work.mm_getusers, + user=0 )/*/STORE SOURCE*/; filename response temp; -proc metadata in= ' - $METAREPOSITORY - Person - SAS - 0 - - - - - - ' - out=response; -run; + +%if %superq(&user)=0 %then %do; + proc metadata in= ' + $METAREPOSITORY + Person + SAS + 0 + + + + + + ' + out=response; + run; +%end; +%else %do; + proc metadata in= " + $METAREPOSITORY + Person + SAS + + 128 + + + + + + + " + out=response; + run; +%end; filename sxlemap temp; data _null_; diff --git a/meta/mm_getusers.sas b/meta/mm_getusers.sas index ce6fd4b..d5470e2 100644 --- a/meta/mm_getusers.sas +++ b/meta/mm_getusers.sas @@ -8,17 +8,18 @@ %mm_getusers() + Optionally, filter for a user (useful to get the uri): + + %mm_getusers(user=&_metaperson) + @param outds the dataset to create that contains the list of libraries @returns outds dataset containing all users, with the following columns: - uri - name - @warning The following filenames are created and then de-assigned: - - filename sxlemap clear; - filename response clear; - libname _XML_ clear; + @param user= (0) Set to a metadata user to filter on that user + @param outds= (work.mm_getusers) The output table to create @version 9.3 @author Allan Bowe @@ -26,23 +27,44 @@ **/ %macro mm_getusers( - outds=work.mm_getusers + outds=work.mm_getusers, + user=0 )/*/STORE SOURCE*/; filename response temp; -proc metadata in= ' - $METAREPOSITORY - Person - SAS - 0 - - - - - - ' - out=response; -run; + +%if %superq(&user)=0 %then %do; + proc metadata in= ' + $METAREPOSITORY + Person + SAS + 0 + + + + + + ' + out=response; + run; +%end; +%else %do; + proc metadata in= " + $METAREPOSITORY + Person + SAS + + 128 + + + + + + + " + out=response; + run; +%end; filename sxlemap temp; data _null_;