BookmarkSubscribeRSS Feed
SusieQ324
Fluorite | Level 6
Anyone know how to shut this off? I'm using a %include for a proc format statement coming from a vendor and the output is quite large as it prints the value of the entire format statement to the log. Anyway to shut this off?
6 REPLIES 6
RickM
Fluorite | Level 6
You could do

ods listing close;
%include...
ods listing;

ods exclude=ALL is another option.

*Never mind, I was thinking of the output window, not the log.

Message was edited by: RickM

Try using

proc printo log="file.log";run
%include
proc printto;run; Message was edited by: RickM
Tim_SAS
Barite | Level 11
Try the NOSOURCE2 option.

[pre]
SOURCE2 | NOSOURCE2
specifies whether SAS writes secondary source statements from files included by %INCLUDE statements to the SAS log.
[/pre]
SusieQ324
Fluorite | Level 6
Thanks Tim. How is this handled if it's embedded within a Macro. Looks like when I have MPRINT turned on, it'll still print. Anyway around that as well?
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
What's unclear here is whether there is a SOURCE2 coded explicitly on the %INCLUDE within your "vendor-supplied macro" - I suspect that it is?

You can use a SAS macro "statement" (old-style, some call SAS 79 style), as shown below:

MACRO SOURCE2 NOSOURCE2 %

This will cause SAS to change the code string SOURCE2 to NOSOURCE2.


Scott Barry
SBBWorks, Inc.
SusieQ324
Fluorite | Level 6
Thanks Scott. I checked the macro and it's strictly VALUE statements...no options set, so it must be a default of my system. The code you suggest didn't work for me so I'll just have to live with it in the debug process and then make sure it's turned off for other usage.

If anyone has other suggestions, I'd appreciate it.
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
The code statement is the %INCLUDE, not the specific PROC FORMAT. If you have access to the actual PROC or DATA step code-piece, you can always insert this statement:

OPTIONS NOSOURCE NOSOURCE2;

More information is needed to explain the SAS programming technique used, such as whether a MACRO is defined or open SAS code? Try the OPTIONS above - you will want to verify that there is no other OPTIONS statement being invoked within the vendor code.

Scott Barry
SBBWorks, Inc.

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1456 views
  • 2 likes
  • 4 in conversation