01-29-2016 10:45 AM
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,
01-29-2016 10:54 AM
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.
Need further help from the community? Please ask a new question.