Is there any way I can save several proc freq and proc contents output tables together (like an log file)? For example:
proc freq data=a; table b c; run;
proc freq data=a1; table b1 c1; run;
proc contents data=a3; run;
I would like to open the saved tables in SAS. Like open an saved log file? Thank you
I would suggest creating document such as RTF or PDF using ods.
ods rtf file='c:\path\myoutput.rtf'; proc freq data=a; table b c; run; proc freq data=a1; table b1 c1; run; proc contents data=a3; run; ods rtf close;
While those procedures can create output data sets and they could be combined the result would be ugly at best and practically unusable for almost anything. The above code creates a document that most word processors can open for your reading enjoyment. Change the path and file name to what ever you want.
You have several output options, within SAS and outside.
You can use ODS to have the results sent to PDF, RTF (word), XLSX, PPTX, HTML and some other options.
Or you can capture the data into tables and use those.
If you're looking for the latter, use the OUT= on the TABLE statement and PROC CONTENTS.
If the first, then use something like the following:
ods pdf file='path to file.pdf';
Your sas code goes here;
ods pdf close;
@SSH2 wrote:
Is there any way I can save several proc freq and proc contents output tables together (like an log file)? For example:
proc freq data=a; table b c; run;
proc freq data=a1; table b1 c1; run;
proc contents data=a3; run;
I would like to open the saved tables in SAS. Like open an saved log file? Thank you
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.