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
@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 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.
Thank you. It will be very helpful.
wklierman
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!
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.