You can try the below code. It is not tested but it should work. I have used metasec_getnauth function. There are separate function for metadata security. options metaserver=metadata_server_name.IP_address /* network name/address of the metadata server, */
/* for example, metaserver=d441.na.sas.com) */
metaport=8561 /* The port on which the metadata server is listening. */
metauser="metadata\userid" /* The domain-qualified user ID for the connection to */
/* the metadata server. */
metapass="password" /* Password for the METAUSER= user ID. */
metaprotocol=bridge /* Protocol for the metadata server. */
metarepository=Foundation; /* The default location of the user information that */
/* is in the foundation repository. */
data folders;
length uri Folder group groupuri $256 id $20;
length tc type name auth perm cond $20;
/* Initialize variables to missing. */
n=1;
uri='';
Folder='';
/* Determine how many person objects are defined. */
nobj=metadata_getnobj("omsobj:Tree?@Name contains ''",n,uri);
if nobj=0 then put 'No folders available.';
else do while (nobj > 0);
/* Retrieve the current person's name. */
rc=metadata_getattr(uri, "Name", Folder);
n+1;
nobj=metadata_getnobj("omsobj:Tree?@Name contains ''",n,uri);
n_auth=1;
rc_auth=metasec_getnauth(tc,uri,n_auth,type,name,auth,perm,cond);
do while (rc_auth=0);
rc_auth=metasec_getnauth(tc,uri,n_auth,type,name,auth,perm,cond);
n_auth+1;
output;
end;
end;
keep Folder type name perm ;
run;
... View more