Just some code to help you get in the right direction....
The following program makes a list of all libnames and which ACT that are connected to them:
options metaprotocol=bridge
metauser="USER"
metapass="PASSWORD"
metarepository="Foundation";
data library_act(keep=library_name ACT_name hasIdentity);
length lib_uri ACT_uri library_name ACT_name PT_uri $256;
nobj=0;
n = 1;
ACT_uri=''; lib_uri=''; PT_uri=''; library_name = '';
/* Determine how many SASLibrary objects are in this repository. */
nobj=metadata_getnobj("omsobj:SASLibrary?@id contains '.'",n,lib_uri);
do until(nobj < 0);
/* Get libref attributes */
rc = metadata_getattr(lib_uri,"Name",library_name);
rc = metadata_getnasn(lib_uri,"AccessControls",1,ACT_uri);
ACT_name ='';
hasIdentity = 0;
if rc > 0 then do;
rc = metadata_getattr(ACT_uri,"Name",ACT_name);
rc1 = metadata_getnasn(ACT_uri,"Identities",1,PT_uri);
if rc1 > 0 then hasIdentity = 1;
rc1 = metadata_getnasn(ACT_uri,"AccessControlItems",1,PT_uri);
if rc1 > 0 then hasIdentity = 1;
end;
if ACT_name = '' then ACT_name = 'missing';
n=n+1;
output;
nobj=metadata_getnobj("omsobj:SASLibrary?@Id contains '.'",n,lib_uri);
end; /* do until */
run;
Metabrowse is very useful and you will find more datastep functions for reading metadata in SAS-documentation. You can also use xml to get the same result, i have not done that thou'
Message was edited by: FredrikE