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

What is the best (fool-proof?) method to save the output from the Results screen / view generated in a SAS program.  An example is proc freq tables results.

 

Similarly, if you use ODS / proc gchart how are results saved so the chart or proc freq results can be saved and sent to others as attachments in emails or teams?

 

Thanks.

 

wklierman

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

@wlierman wrote:

What is the best (fool-proof?) method to save the output from the Results screen / view generated in a SAS program.  An example is proc freq tables results.

 

Similarly, if you use ODS / proc gchart how are results saved so the chart or proc freq results can be saved and sent to others as attachments in emails or teams?

 


In my possibly not so humble opinion taking control of your output by directing specific output to files using ODS destinations is the most fool proof. The only change needed to most programs would be to place code inside an ods sandwich:

 

ods rtf file="path\filename.rtf" <other rtf related options if desired>;

 

<proc freq code or any other procedures that generate output to the result window>

 

ods rtf close;

 

The document can be sent as an attachment or what ever.

ODS RTF, Word or PDF can have graph and procedure tables both as content.

 

I would strongly suggest learning Proc SGPLOT or SGPANEL in place of Gchart. For one thing Gchart requires additional licensing and there are many things you can do with SGPLOT/SGPANEL just not possible without lots of work with Gchart or Gplot.

View solution in original post

2 REPLIES 2
ballardw
Super User

@wlierman wrote:

What is the best (fool-proof?) method to save the output from the Results screen / view generated in a SAS program.  An example is proc freq tables results.

 

Similarly, if you use ODS / proc gchart how are results saved so the chart or proc freq results can be saved and sent to others as attachments in emails or teams?

 


In my possibly not so humble opinion taking control of your output by directing specific output to files using ODS destinations is the most fool proof. The only change needed to most programs would be to place code inside an ods sandwich:

 

ods rtf file="path\filename.rtf" <other rtf related options if desired>;

 

<proc freq code or any other procedures that generate output to the result window>

 

ods rtf close;

 

The document can be sent as an attachment or what ever.

ODS RTF, Word or PDF can have graph and procedure tables both as content.

 

I would strongly suggest learning Proc SGPLOT or SGPANEL in place of Gchart. For one thing Gchart requires additional licensing and there are many things you can do with SGPLOT/SGPANEL just not possible without lots of work with Gchart or Gplot.

wlierman
Lapis Lazuli | Level 10

Thank you.  It will be very helpful.

 

wklierman

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
  • 736 views
  • 0 likes
  • 2 in conversation