I would like to search a sas data sets with name include "Loan".
If i know the specific library i can do it by proc datasets
proc datasets
library = work
memtype = data;
contents
data = _all_ (keep = libname memname name)
out = work.table_name;
quit;
run;
(afterward i will select those memname contains "loan" using index function)
I would like to change the line library = work to library = _all_
While it file to access the library information. Is there any alternative way to achieve the task?
Use the SASHELP.VTABLE view. It lists all tables in all libraries
proc sql noprint;
create table search as
select * from sashelp.vtable
where upcase(memname) like '%LOAN%';
quit;
or
data search;
set sashelp.vtable;
if index(upcase(memname),'LOAN');
run;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With