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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 840 views
  • 0 likes
  • 5 in conversation