列出 SAS LIBRARIES 中的所有库名称

list ALL library name in SAS LIBRARIES

我想搜索一个名为 include "Loan".

的 sas 数据集

如果我知道具体的库,我可以通过 proc datasets

proc datasets
    library = work
    memtype = data;
    contents
        data = _all_ (keep = libname memname name)
        out = work.table_name;
quit;
run;

(之后我将 select 那些 memname 包含 "loan" 使用 index 函数)

我想将行 library = work 更改为 library = _all_ 同时它文件访问图书馆信息。有没有其他方法可以完成任务?

您可以为此目的使用 "Dictionary" 个 SAS 表,您可以搜索数据集名称、列名称等

proc sql;
   create table mytable as
      select * from sashelp.vtable
      where upcase(memname) like '%LOAN%';
quit;

例如:-

 VCATALG Provides information about SAS catalogs.
 VCOLUMN Provides information about column in tables.
 VEXTFL Provides information related to external files.
 FORMATS Provides information related to defined formats and informats.
 VINDEX Provides information related to defined indexes.
 VMACRO Provides information related to any defined macros.
 VOPTION Provides information related to SAS system options.
 VTABLE Provides information related to currently defined tables.
 VTITLE Provides information related to currently defined titles and footnotes.
 VVIEW Provides information related to currently defined data views.

http://support.sas.com/documentation/cdl/en/lrcon/67885/HTML/default/viewer.htm#p00cato8pe46ein1bjcimkkx6hzd.htm

http://support.sas.com/documentation/cdl/en/lrcon/65287/HTML/default/viewer.htm#p00cato8pe46ein1bjcimkkx6hzd.htm

https://v8doc.sas.com/sashtml/proc/zsqldict.htm

使用 SASHELP.VTABLE 视图。它列出了所有库中的所有表

proc sql noprint;
   create table search as
      select * from sashelp.vtable
         where upcase(memname) like '%LOAN%';
quit;

data search;
   set sashelp.vtable;
   if index(upcase(memname),'LOAN');
run;