BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
1 ACCEPTED SOLUTION

Accepted Solutions
novinosrin
Tourmaline | Level 20

Not sure. But you can filter

 

proc contents data=sashelp.class out=want(where=(type=1));
run;
proc print noobs;run;

View solution in original post

6 REPLIES 6
novinosrin
Tourmaline | Level 20

Not sure. But you can filter

 

proc contents data=sashelp.class out=want(where=(type=1));
run;
proc print noobs;run;
accintron
Obsidian | Level 7

Thank you, this is what I was able to use successfully. I appreciate the help!

PaigeMiller
Diamond | Level 26

Sort the output data set by type, then print.

--
Paige Miller
accintron
Obsidian | Level 7

Thanks for your reply! While I didn't go this route, it was helpful to try this option. 

FreelanceReinh
Jade | Level 19

Or use an index on the (ODS or traditional) output dataset:

ods output variables=vars(index=(type) drop=member);
proc contents data=sashelp.class;
run;

proc print data=vars noobs;
by type;
run;

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 803 views
  • 1 like
  • 4 in conversation