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;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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