ユーザーはメタデータを照会するために管理者である必要はありません。彼らは、メタデータオブジェクトへの読み取りアクセス権を持っている必要があります。私は、当社のサーバー上のユーザーだけだ、と私はhttp://support.sas.com/kb/30/682.htmlの適応を使用して、すべてのユーザーとその関連グループのリストを取得することができます。
data users_grps (keep=name group email);
length uri name groupuri group emailuri email $256 ;
call missing(uri, name, groupuri, group, emailuri, email) ;
/* Get URI of first person */
n=1;
nobj=metadata_getnobj("omsobj:[email protected] contains '.'",n,uri);
if nobj=0 then put 'No Persons available.';
do while (nobj > 0);
call missing(name, groupuri, group, emailuri, email) ;
/* Retrieve the current persons name. */
rc=metadata_getattr(uri, "Name", Name);
/* get the persons email address (only first one)*/
rc2=metadata_getnasn(uri,"EmailAddresses",1,emailURI) ;
rc3=metadata_getattr(emailuri, "Address", email);
/* Get the group association information for the current person. */
a=1;
rcgrp=metadata_getnasn(uri,"IdentityGroups",a,groupuri);
/* If this person does not belong to any groups, set their group */
/* variable to 'No groups' and output the name. */
if rcgrp in (-3,-4) then do;
group="No groups";
output;
end;
/* If the person belongs to any groups, loop through the list */
/* and retrieve the name of each group, outputting each on a */
/* separate record. */
else do while (rcgrp > 0);
rc4=metadata_getattr(groupuri, "Name", group);
a+1;
output;
rcgrp=metadata_getnasn(uri,"IdentityGroups",a,groupuri);
end;
/* Get URI of next person. */
n+1;
nobj=metadata_getnobj("omsobj:[email protected] contains '.'",n,uri);
end;
run;
はそれがのグループをルックアップするために適合させることができると思うだろう現在の使用者。