The SAS Output Delivery System and reporting techniques

Stopping proc tabulate or proc sql from dispayling output in ods pdf

Reply
N/A
Posts: 0

Stopping proc tabulate or proc sql from dispayling output in ods pdf

Hi

I'm trying to produce graphs that have axis which automatically re-scale depending on the data. In order to do that I need to calculate the min and max's of certain variables. However whenever I do that the output of the proc tabulate shows in the pdf.

Does anyone know how I can stop that?

The program is already using an awefull lot of macros and is quite complicated so I was hoping I wouldn't have to store these values in macros.

All suggestions are greatly appreciated.

Thanks,
Chris
Super Contributor
Posts: 394

Re: Stopping proc tabulate or proc sql from dispayling output in ods pdf

Posted in reply to deleted_user
I think the ODS EXCLUDE statement is what you're looking for: http://support.sas.com/documentation/cdl/en/odsug/61723/HTML/default/a002233281.htm.
N/A
Posts: 0

Re: Stopping proc tabulate or proc sql from dispayling output in ods pdf

Hi Tim

Thanks for the reply, but I am still having trouble getting rid of the output.

My code basically reads like:

ods pdf file="";
ods pdf exclude SQL.SQL_Results (which i got using ods trace);

proc report ;

run;
quit;

proc sql;
select min(age)
into :age
from table
quit;

ods pdf close;

I don't want to display the SQL step which is only assigning macros. Am i putting the exclude statement in the wrong place?

Thanks again for your help.
Chris
SAS Employee
Posts: 174

Re: Stopping proc tabulate or proc sql from dispayling output in ods pdf

Posted in reply to deleted_user
Chris,

Selection/exclusion lists reset at proc boundaries by default. Try putting the ODS PDF EXCLUDE statement immediately before the PROC SQL statement.

-- David Kelley, SAS
Respected Advisor
Posts: 3,799

Re: Stopping proc tabulate or proc sql from dispayling output in ods pdf

Posted in reply to deleted_user
Why not just use NOPRINT on the PROC SQL or RESET NOPRINT; statement?
Super User
Posts: 11,343

Re: Stopping proc tabulate or proc sql from dispayling output in ods pdf

Posted in reply to data_null__
It may be necessary to move any of the "support" steps to outside of the ods pdf area of the code. The intermediate data sets or macro variables will persist unless explicitly removed.

It may not make the program code quite as clear when the final displayed output is separated from the parts creating the data but it will correct the display issue.
N/A
Posts: 0

Re: Stopping proc tabulate or proc sql from dispayling output in ods pdf

Posted in reply to deleted_user
Hi everyone

I've managed to stop it from outputing. I basically wrapped the proc sql step in an exclude all statement.

Not as elegant as it could be but it worked so I can't complain.

Thanks for all your help.

Chris
Ask a Question
Discussion stats
  • 6 replies
  • 194 views
  • 0 likes
  • 5 in conversation