BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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
6 REPLIES 6
deleted_user
Not applicable
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
David_SAS
SAS Employee
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
data_null__
Jade | Level 19
Why not just use NOPRINT on the PROC SQL or RESET NOPRINT; statement?
ballardw
Super User
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.
deleted_user
Not applicable
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

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1215 views
  • 0 likes
  • 5 in conversation