BookmarkSubscribeRSS Feed
JMarkW
Fluorite | Level 6
I'm working with a high volume macro programming job on Solaris UNIX. I've been able to suppress unneeded items going to the log except for global and automatic macro variable definitions. I've done proc options and set every option that appears to be related to the printing of info to the log.

Any ideas how to suppress messages like the following?

GLOBAL MDATE14
GLOBAL HNAME16
GLOBAL LSDATE19
GLOBAL FILE19
GLOBAL FTYPE19
GLOBAL MDATE23
AUTOMATIC AFDSID 0
AUTOMATIC AFDSNAME
AUTOMATIC AFLIB
AUTOMATIC AFSTR1
AUTOMATIC AFSTR2
AUTOMATIC FSPBDV
AUTOMATIC SYSBUFFR
AUTOMATIC SYSCC 0
AUTOMATIC SYSCHARWIDTH 1
AUTOMATIC SYSCMD
AUTOMATIC SYSDATE 07OCT08
3 REPLIES 3
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
I suspect that your SAS program has one or more of the following commands:

%PUT _GLOBAL_;

%PUT _AUTOMATIC_;

If you set the following options, it should be pretty obvious where the code is, relative to other SAS processing:

MACRO NOSOURCE SOURCE SOURCE2 MACROGEN SYMBOLGEN MLOGIC %
OPTIONS NOSOURCE;

Using SAS old-style (SAS 79) macro statements (as opposed to the SAS macro language), the character string "NOSOURCE" will be substituted with the data that follows. So, if there is any SAS code that turns off SOURCE, you can expect it to be turned back on with maximum SASLOG diagnostics information.


Scott Barry
SBBWorks, Inc.
JMarkW
Fluorite | Level 6
The source2 option did cause a "%put _ALL_;" line to show up in an included macro subroutine that a third party wrote. This is a large macro process with dozens of macro subroutines and over 1,000 lines of code.

Am I correct to assume that "%put _ALL_;" will print automatic and global variables? The manuals I have don't mention that or the MACROGEN command. Message was edited by: JMarkW
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Here's the SAS 9 Macro Language Doc reference:

http://support.sas.com/onlinedoc/913/getDoc/en/mcrolref.hlp/a000206943.htm


Run this code:

%let z = I am global;
%macro x;
%let y = I am local;
%put _all_;
%mend x;
%x;

Scott Barry
SBBWorks, Inc.

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
  • 3 replies
  • 957 views
  • 0 likes
  • 2 in conversation