I would like to pull proc dataset information from all of the datasets that contain a 'facility_id' variable in them. Is there any way to do a search like that? I'm looking at a library that has several hundred tables and I only want the tables with that specific variable.
Thank You in advance,
Mark
Dictionary tables comes from SQL, they are pretty much interchangeable with SASHELP.VTABLE/VCOLUMNS, and are the metadata for the table. E.g.
proc sql;
create table TMP as
select * from DICTIONARY.TABLES;
quit;
No probs. Check out the SAS metadata tables:
proc sql;
create table WANT as
select *
from SASHELP.VCOLUMNS /* Could also use dictionary tables */
where MEMNAME in (select distinct MEMNAME from SASHELP.VCOLUMNS where NAME="FACILITY_ID");
quit;
The above will show you the metadata for all tables which have that variable in.
I do not know what you mean by dictionary tables.
Dictionary tables comes from SQL, they are pretty much interchangeable with SASHELP.VTABLE/VCOLUMNS, and are the metadata for the table. E.g.
proc sql;
create table TMP as
select * from DICTIONARY.TABLES;
quit;
Hi there,
I think we may avoid use of "DICTIONARY.TABLES" when we are searching for datasets based on a particular variable. Dictionary.tables do not provide information related to variable name which are available in SASHELP. VCOLUMN.
Regards,
Deepak
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.