I've resolved this myself by using a working version of another piece of code (used for obtaining DI Job information) and injecting the same ResponsibleParty functions, which now works in this context. data MDIDs;
length Server_Uri rp_uri Metadata_ID Name _Name TypeName Path Location _Location MetadataCreated MetadataUpdated CreatedBy ModifiedBy $256;
length Created Modified 8.;
format Created Modified datetime19.;
nobj = 1;
n=1;
call missing(Metadata_ID, _Name, MetadataCreated, MetadataUpdated, Created, Modified, TypeName, Path, Server_Uri, _location, CreatedBy, ModifiedBy);
do while(n le nobj);
nobj=metadata_getnobj("omsobj:Transformation?@PublicType = 'Report.BI'",n,Server_Uri);
rc=metadata_getattr(Server_Uri,'Id',Metadata_ID);
rc=metadata_getattr(Server_Uri,'Name',_Name);
rc=metadata_getattr(Server_Uri,"MetadataCreated",MetadataCreated);
rc=metadata_getattr(Server_Uri,"MetadataUpdated",MetadataUpdated);
name=translate(translate(translate(translate(_name,"-","–"),"£","£"),"%","%"),"+","+");
Created=input(MetadataCreated,anydtdtm.);
Modified=input(MetadataUpdated,anydtdtm.);
rc=metadata_getattr(Server_Uri,"PublicType",TypeName);
numrp=metadata_getnasn(Server_Uri,"ResponsibleParties",1,rp_uri);
if numrp>0 then do;
numrp=metadata_getnasn(Server_Uri,"ResponsibleParties",1,rp_uri);
rc=metadata_getattr(rp_uri,"name",CreatedBy);
numrp=metadata_getnasn(Server_Uri,"ResponsibleParties",2,rp_uri);
rc=metadata_getattr(rp_uri,"name",ModifiedBy);
end;
TreesCount=metadata_getnasn(Server_Uri,"Trees",1,Server_Uri);
rc=metadata_getattr(Server_Uri,"Name",Path);
_tree=1;
do while (_tree>0);
_tree=metadata_getnasn(Server_Uri,"ParentTree",1,Server_Uri);
if _tree > 0 then do;
_rc=metadata_getattr(Server_Uri,"Name",_location);
Path=catx('/',_location,Path);
end;
end;
Location = '/'||Path;
output;
n=n+1;
end;
keep Metadata_ID Name TypeName Location Created Modified CreatedBy ModifiedBy;
run;
... View more