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

The requirement is: Use PROC CONTENTS to view the descriptor portion of each of the three data sets.
Include only the first table from each of the PROC CONTENTS output (the one with the
number of observations and variables) and don’t include the other two tables (engine data
and variable attributes) in the Report

Does anyone know what I need to add on proc contents and let it only shows the first table?

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenKuhfeld
Rhodochrosite | Level 12

Use ods trace on to find the names of the tables.  Then use ods select to select the table(s) of interest.

 

ods trace on;
proc contents data=sashelp.iris;
   ods select attributes;
run;

View solution in original post

3 REPLIES 3
WarrenKuhfeld
Rhodochrosite | Level 12

Use ods trace on to find the names of the tables.  Then use ods select to select the table(s) of interest.

 

ods trace on;
proc contents data=sashelp.iris;
   ods select attributes;
run;
ydu180
Calcite | Level 5

Thank you it works.

Tom
Super User Tom
Super User

Of course you could just skip the PROC CONTENTS altogether and query the metadata yourself.

proc print data=sashelp.vtable ;
  where libname='WORK';
run;

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 3 replies
  • 3785 views
  • 0 likes
  • 3 in conversation