I'm using SAS Enterprise Guide 7.1. I deselected the "Show generated wrapper code in SAS log," which displays a macro instead of the code in the log. But since I need to use MPRINT/MLOGIC/SYMBOLGEN in my SAS code, the replacement for the wrapper code turns into this mess in the log, which is even worse than the original wrapper code - any way to supress this without turning off macro debugging options?
1 %_eg_hidenotesandsource;
MLOGIC(_EG_HIDENOTESANDSOURCE): Beginning execution.
MLOGIC(_EG_HIDENOTESANDSOURCE): %GLOBAL _EGNOTES
MLOGIC(_EG_HIDENOTESANDSOURCE): %GLOBAL _EGSOURCE
MLOGIC(_EG_HIDENOTESANDSOURCE): %LET (variable name is _EGNOTES)
MPRINT(_EG_HIDENOTESANDSOURCE): options nonotes;
MLOGIC(_EG_HIDENOTESANDSOURCE): %LET (variable name is _EGSOURCE)
MPRINT(_EG_HIDENOTESANDSOURCE): options nosource;
MLOGIC(_EG_HIDENOTESANDSOURCE): Ending execution.
MLOGIC(_EG_RESTORENOTESANDSOURCE): Beginning execution.
MLOGIC(_EG_RESTORENOTESANDSOURCE): %GLOBAL _EGNOTES
MLOGIC(_EG_RESTORENOTESANDSOURCE): %GLOBAL _EGSOURCE
SYMBOLGEN: Macro variable _EGNOTES resolves to NOTES
MPRINT(_EG_RESTORENOTESANDSOURCE): options NOTES;
SYMBOLGEN: Macro variable _EGSOURCE resolves to SOURCE
MPRINT(_EG_RESTORENOTESANDSOURCE): options SOURCE;
MLOGIC(_EG_RESTORENOTESANDSOURCE): Ending execution.
5 %_eg_hidenotesandsource;
MLOGIC(_EG_HIDENOTESANDSOURCE): Beginning execution.
MLOGIC(_EG_HIDENOTESANDSOURCE): %GLOBAL _EGNOTES
MLOGIC(_EG_HIDENOTESANDSOURCE): %GLOBAL _EGSOURCE
MLOGIC(_EG_HIDENOTESANDSOURCE): %LET (variable name is _EGNOTES)
MPRINT(_EG_HIDENOTESANDSOURCE): options nonotes;
MLOGIC(_EG_HIDENOTESANDSOURCE): %LET (variable name is _EGSOURCE)
MPRINT(_EG_HIDENOTESANDSOURCE): options nosource;
MLOGIC(_EG_HIDENOTESANDSOURCE): Ending execution.
SYMBOLGEN: Macro variable SASWORKLOCATION resolves to "D:\SAS-TEMP\_TD13064_S12ZAPSTAT07_\Prc2/"
MLOGIC(_EG_RESTORENOTESANDSOURCE): Beginning execution.
MLOGIC(_EG_RESTORENOTESANDSOURCE): %GLOBAL _EGNOTES
MLOGIC(_EG_RESTORENOTESANDSOURCE): %GLOBAL _EGSOURCE
SYMBOLGEN: Macro variable _EGNOTES resolves to NOTES
MPRINT(_EG_RESTORENOTESANDSOURCE): options NOTES;
SYMBOLGEN: Macro variable _EGSOURCE resolves to SOURCE
MPRINT(_EG_RESTORENOTESANDSOURCE): options SOURCE;
MLOGIC(_EG_RESTORENOTESANDSOURCE): Ending execution.
Check what are your default settings:
proc options;
run;
If by default they are turned on, then you will need to turn them off:
add --> OPTIONS NOSYMBOLGEN NOMPRINT NOMLOGIC; to --> go to Tools>options>SAS Programs>Submit SAS code when server is connected.
You can turn them on at the beginning of your program and don't forget to turn them off again at the end to suppress the log for the macro that runs after code is submitted.
Where did you set the options for SYMBOLGEN MPRINT MLOGIC. If you have those in the program editor, then that options will be set only after the wrapper is executed. By any chance did you set the options under tools>options>SAS Programs>Insert custom SAS code before submitted code ?
@coffee_liz wrote:
They're set in the program editor. The log snippet in my original post appears around every bit of code I run from the program.
@SuryaKiran is correct, please mark his answer as correct. To remove those notes, turn the options on at the top of your program and then off again at the bottom and you don't get the messages.
I tried also placing that code in the 'run before/after process' under tools but it executes after the wrapper code.
You can test it with this, a fully workable SAS program.
options mprint mlogic symbolgen;
/********************************************************************
Example : Call macro using parameters from data set
********************************************************************/
*define macro to be called later;
%macro summary(age=, sex=);
proc print data=sashelp.class;
where age=&age and sex="&sex";
run;
%mend;
*sort data to ensure correct order for next steps;
proc sort data=sashelp.class out=class;
by age sex;
run;
*create macro string to be called in next step. Note the macro is called at the last of each reord;
data sample;
set class;
by age sex;
if last.sex;
string =
catt('%summary(age=', age, ',sex=', sex, ');');
put string;
run;
*Call macro - can be done in previous step but broken out here for demonstration purposes;
data _null_;
set sample;
call execute(string);
run;
options nomprint nomlogic nosymbolgen;
Check what are your default settings:
proc options;
run;
If by default they are turned on, then you will need to turn them off:
add --> OPTIONS NOSYMBOLGEN NOMPRINT NOMLOGIC; to --> go to Tools>options>SAS Programs>Submit SAS code when server is connected.
You can turn them on at the beginning of your program and don't forget to turn them off again at the end to suppress the log for the macro that runs after code is submitted.
@SuryaKiran wrote:
Where did you set the options for SYMBOLGEN MPRINT MLOGIC. If you have those in the program editor, then that options will be set only after the wrapper is executed. By any chance did you set the options under tools>options>SAS Programs>Insert custom SAS code before submitted code ?
And are you turning it off at the end of your program - before the closing wrapper code?
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.