BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Steelers_In_DC
Barite | Level 11

I'd like to run a proc datasets lib=XXXX;contents data=_all_;quit;run; but one of the tables is corrupted so it will fail.  I do not want to delete the bad table to get this information.  Is there a way to get this information without going through each table 1 by 1?

Thanks in advance,

Mark

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Another place to look at the information about SAS tables in variables are the DICTIONARY tables available for use in proc sql or the views in SASUSER. I don't know if this has a problem with a corrupted dataset as I don't have one to test with at the moment.

Proc sql;

     create table libcontents as

     select Memname

     from dictionary.members

     where libname='LIBRARY';

quit;

use

Proc SQL;

     describe table dictionary.columns ;/* for variable info or  dictionary.members for dataset info*/

quit;

View solution in original post

2 REPLIES 2
Steelers_In_DC
Barite | Level 11

I ended up getting the data from proc datasets lib=xxxx:quit;run;

then putting that into

proc datasets lib=xxxx nolist;contents data= ____;quit;run

using excel's concatenate to list the 400 table names, copy pasted it into SAS, if there are any other options let me know.

Cheers,

ballardw
Super User

Another place to look at the information about SAS tables in variables are the DICTIONARY tables available for use in proc sql or the views in SASUSER. I don't know if this has a problem with a corrupted dataset as I don't have one to test with at the moment.

Proc sql;

     create table libcontents as

     select Memname

     from dictionary.members

     where libname='LIBRARY';

quit;

use

Proc SQL;

     describe table dictionary.columns ;/* for variable info or  dictionary.members for dataset info*/

quit;

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

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!

Register Now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1052 views
  • 4 likes
  • 2 in conversation