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 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!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 6 replies
  • 1944 views
  • 2 likes
  • 4 in conversation