One way to do it is to use the jobID macro varaible and use the following code to get the folder location: data _null_; length name _uri location _location $200; _rc=1; _uri="&jobID"; _rc=metadata_getnasn(_uri,"Trees",1,_uri); _rc=metadata_getattr(_uri,"Name",location); _tree=1; do while (_tree>0); _tree=metadata_getnasn(_uri,"ParentTree",1,_uri); if _tree > 0 then do; _rc=metadata_getattr(_uri,"Name",_location); location=catx('/',_location,location); end; end; location = '/'||location; put location=; run;
... View more