The SAS Output Delivery System and reporting techniques

ODS output + ODS pdf in combination

Accepted Solution Solved
Reply
Contributor KAZ
Contributor
Posts: 24
Accepted Solution

ODS output + ODS pdf in combination

This is a basic question regarding saving ods output for later ods printing.

 

I would like to run a series of analysis procs and save the desired output.  For example:

 

ods output CrossTabFreqs = _CrossTabFreqs;

proc freq data=mydata; tables X*Y; run;

 

ods output PearsonCorr = _PearsonCorr;

proc corr data=mydata; var X Y; with M N O; run;

 

ods fitplot = _fitplot;

proc reg data=mydata; model X = Y; run;

 

I now would like to create a pdf with the three selected ods output object in some order.  For example:

ods pdf file="C:\mypdf.pdf";

  *** what code goes here ***

  *** so that I print the crossTab, pearson correlations and plot ***

ods pdf close;

 

I am using ods trace to obtain the default templates used for each output objects, but I don't know how to send those objects to the pdf destination.

 

Thanks for the help,


Accepted Solutions
Solution
‎01-29-2016 11:21 AM
Super Contributor
Posts: 394

Re: ODS output + ODS pdf in combination

Look at PROC DOCUMENT, particularly the REPLAY statement.

View solution in original post


All Replies
Solution
‎01-29-2016 11:21 AM
Super Contributor
Posts: 394

Re: ODS output + ODS pdf in combination

Look at PROC DOCUMENT, particularly the REPLAY statement.

Grand Advisor
Posts: 10,210

Re: ODS output + ODS pdf in combination

ods pdf file="C:\mypdf.pdf";

   proc print data = _CrossTabFreqs;
   run;

   proc print data= _PearsonCorr;
   run;

   proc print data=_fitplot;
   run;

ods pdf close;

If you want to make the plot, not print the data then use an appropriate graphing procedure.

 

OR possibly ODS select and just put all of the procedures in side the ODS sandwich.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 348 views
  • 1 like
  • 3 in conversation