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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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