I am currently using this: proc datasets lib=tran1214 nolist;contents data=_all_ noprint out=MDJ.tran1214;quit;run;
I can search the output to find a table that has one or several variables that I need to use. There is one table that has a corrupted table so it will not work. I would like to do something like this (this does not work)
proc datasets lib=wbdw nolist;
contents data = ABS_02PORTFOLIO_CONVERSION ;
contents data = ACLS_CONCENTRATION_FACT ;
contents data = ACLS_CUSTOMER_DIMENSION ;
contents data = ACLS_LOAN_DIMENSION ;
contents data = AGENDA_ACTIVITY_DIM ;
contents data = AGENDA_ATTEND_FACT ;
contents data = AGENDA_CONTACT_FACT ;
currently I'm taking this output with several hundred tables and putting it into excel to search for variables. Is there a way to list multiple datasets rather than _all_?
I'm using the output to feed into this:
proc sql;
create table WANT as
select DISTINCT MEMNAME
from &check_lib
where
/*MEMNAME in (select distinct MEMNAME from &check_lib where upcase(NAME)="ACCT_PARTICIPATED_AMT") AND*/
/*MEMNAME in (select distinct MEMNAME from &check_lib where upcase(NAME)="ACCT_CUST_INTEREST_BAL_AMT") AND*/
/*MEMNAME in (select distinct MEMNAME from &check_lib where upcase(NAME)="ACCT_FEE_CURRENT_PAYOFF_AMT") AND*/
/*memname in (select distinct MEMNAME from &check_lib where upcase(NAME) contains "DEFAULT_DATE_END") AND*/
MEMNAME in (select distinct MEMNAME from &check_lib where upcase(NAME) contains "PD");
quit;
I've tried a few things with no viable solutions, any help will be appreciated.
Thanks in advance.
You want to use your SQL on the special SAS DICTIONARY.COLUMNS.
Use this to see the description:
proc sql;
describe table dictionary.columns;
quit;
and then something search the dictionary table to find the memnames with the columns you need. Specify the LIBNAME='YOURLIBGOESHERE' in the where clause.
you could drop all of the UPCASE functions as the LIBNAME, MEMNAME and NAME variables are all upper case in the dictionary tables.
You want to use your SQL on the special SAS DICTIONARY.COLUMNS.
Use this to see the description:
proc sql;
describe table dictionary.columns;
quit;
and then something search the dictionary table to find the memnames with the columns you need. Specify the LIBNAME='YOURLIBGOESHERE' in the where clause.
you could drop all of the UPCASE functions as the LIBNAME, MEMNAME and NAME variables are all upper case in the dictionary tables.
Thanks
Just delete the corrupted table.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.