我想搜索一个名为“Loan”的sas数据集。
如果我知道特定的库,我可以通过proc datasets
proc datasets
library = work
memtype = data;
contents
data = _all_ (keep = libname memname name)
out = work.table_name;
quit;
run;
(之后我将使用index
函数选择那些memname包含“loan”)
我想将行library = work
更改为library = _all_
虽然它提交文件来访问库信息。有没有其他方法可以完成任务?
答案 0 :(得分:7)
使用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;
答案 1 :(得分:3)
您可以使用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.