BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
wlierman
Lapis Lazuli | Level 10

I am looking for the best way to pipe tables (like from proc freq) in the Results screen into some other more usable format for additional analysis. Forms like an output SAS data set for further manipulation or an Excel worksheet.

 

I've looked at SAS Documentation on the SAS website but it is a bit obfuscated (at least for me).

 

Thank you.

 

wlierman

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

What procedure are you using now to produce the reports you are seeing now in your Results?

Check if the procedure can generate a dataset instead of a report.  For example for PROC FREQ use the OUT= option on the TABLES statement.

proc freq data=have;
  tables var1 / noprint out=counts;
run;

If the procedure does not have native facility to produce datasets instead of a report check if you can use ODS OUTPUT to get a dataset of the information used to produce the report.  Use the ODS TRACE statement to see what outputs are available for the report you are running.

View solution in original post

2 REPLIES 2
Tom
Super User Tom
Super User

What procedure are you using now to produce the reports you are seeing now in your Results?

Check if the procedure can generate a dataset instead of a report.  For example for PROC FREQ use the OUT= option on the TABLES statement.

proc freq data=have;
  tables var1 / noprint out=counts;
run;

If the procedure does not have native facility to produce datasets instead of a report check if you can use ODS OUTPUT to get a dataset of the information used to produce the report.  Use the ODS TRACE statement to see what outputs are available for the report you are running.

wlierman
Lapis Lazuli | Level 10

Thank you.  I can go the dataset route.

 

Appreciate your suggestions.

 

wlierman

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 496 views
  • 1 like
  • 2 in conversation