/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Macro usage Note: Retrieving Information from the SAS metadata server about SAS librefs. The Libdebug option will show all atttributes in the SAS logeg The Liburi with META option will allocate the defintions according the metadata definitions. Analysing the log in a file will show all options set. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ /* * * xtst_libraryinfo * * * */ /* * * read libref info from sas metadata s * * * */ %macro xtst_libraryinfo; options ls = 256 ; /* create file wiht a log of selected datasets having a libref in teh SAS metadata */ proc printto log="library_info.log" new; run; data _null_ ; length cmdstr metainfo $255 ; set sashelp.vlibnam (where = (Engine="TERADATA") ) ; cmdstr="LIBURI=""SASLibrary?@libref='"||trim(libname)||"'"" LIBDEBUG" ; rc=libname("test", , "META" , cmdstr ) ; metainfo=sysmsg(); run; proc printto ; run; /* analyse log bestand */ data ad_hoc.libinfo (drop=dum1-dum8) ; file print ls=256 ; infile "library_info.log" lrecl=256; length libname Engine dum1-dum8 $8 dbcommit bulkload defer tpt $3 Connection server user $16 hostname bdappnam $16 dbcreate_table_opts schema password $32 ; file print ; input @ ; if (_infile_ =: "LIBDEBUG:" ) then do; put _infile_ ; input dum1 dum2 libname $ engine $ dbcommit= bulkload= connection= defer= tpt= server= user= password= schema= dbcreate_table_opts= ; hostname="&syshostname" ; bdappnam=sysget("bdappnam") ; output; end; else do; input; end; run; %mend;