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-2024.png

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.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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