Files
dc/sas/sasjs/targets/viya/macros_viya/dc_getlibs.sas
T
dc 582523dc87 feat(dc_getlibs): dump the library list when debug is on
A refresh that catalogues the wrong libraries is hard to read from the log: the
list is built here, then filtered and reworked by its callers.  With
sasjs_mdebug set, print the result so the library list can be checked at source.
2026-10-27 14:22:20 +00:00

36 lines
997 B
SAS

/**
@file dc_getlibs.sas
@brief Gets all available libraries
@details There are two versions of this macro - a META and a VIYA version (in
different folders). The interfaces is the same. This version is VIYA.
<h4> SAS Macros </h4>
@version 9.3
@author 4GL Apps Ltd
@copyright 4GL Apps Ltd. This code may only be used within Data Controller
and may not be re-distributed or re-sold without the express permission of
4GL Apps Ltd.
**/
%macro dc_getlibs(outds=mm_getlibs);
proc sql;
create table &outds as
select distinct libname as LibraryRef
,libname as LibraryName length=256
,engine
,'' as libraryid length=17
from dictionary.libnames
where upcase(libname) not in ("WORK","SASUSER","CASUSER","%upcase(&dc_libref)");
insert into &syslast values ("&DC_LIBREF", "&DC_LIBNAME",'','V9');
%if "&sasjs_mdebug"="1" %then %do;
data _null_;
set &outds;
putlog "NOTE: &sysmacroname: &outds:";
putlog (_all_)(=);
run;
%end;
%mend dc_getlibs;