27 ,outds=work.mm_gettableid
32%
if &mDebug=1 %then %let mD=;
34%&mD.put Executing &sysmacroname..sas;
38 length uri usingpkguri
id type tableuri tablename tmpuri $256;
39 call missing(of _all_);
40 keep tableuri tablename;
43 if metadata_getnobj(
"omsobj:SASLibrary?@Libref='&libref'",n,uri)<1 then
do;
44 put
"Library &libref not found";
47 &mD.putlog
"uri is " uri;
48 if metadata_getnasn(uri,
"UsingPackages", 1, usingpkguri)>0 then
do;
49 rc=metadata_resolve(usingpkguri,type,
id);
50 &mD.putlog
"Type is " type;
53 if type=
'DatabaseSchema' then tmpuri=usingpkguri;
57 do while(metadata_getnasn(tmpuri,
"Tables", t, tableuri)>0);
59 rc= metadata_getattr(tableuri,
"Name", tablename);
60 &mD.putlog
"Table is " tablename;
61 if upcase(tablename)=
"%upcase(&ds)" then
do;