23 %macro mf_getschema(libref
25 %local dsid vnum rc schema;
27 %let libref = %upcase(%scan(&libref, 1, %str(.)));
28 %let dsid=%sysfunc(open(sashelp.vlibnam(where=(
29 libname=
"%upcase(&libref)" and sysname=
'Schema/Owner'
31 %
if (&dsid ^= 0) %then %
do;
32 %let vnum=%sysfunc(varnum(&dsid,SYSVALUE));
33 %let rc=%sysfunc(fetch(&dsid));
34 %let schema=%sysfunc(getvarc(&dsid,&vnum));
35 %put &libref. schema is &schema.;
36 %let rc= %sysfunc(close(&dsid));