BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
coffee_liz
Calcite | Level 5

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.

1 ACCEPTED SOLUTION

Accepted Solutions
SuryaKiran
Meteorite | Level 14

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.

Thanks,
Suryakiran

View solution in original post

8 REPLIES 8
Reeza
Super User
Those are the output from MLOGIC, which you stated you wanted turned on. If you don't want the logic comparisons, turn it off.
coffee_liz
Calcite | Level 5
Thanks, Reeza. But I want the MLOGIC output for everything *except* %_eg_hidenotesandsource - not sure if that's possible.


Reeza
Super User
Unfortunately there's no way to turn off the wrapper code that I'm aware of.
SuryaKiran
Meteorite | Level 14

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 ?

Thanks,
Suryakiran
coffee_liz
Calcite | Level 5
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.


Reeza
Super User

@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;
SuryaKiran
Meteorite | Level 14

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.

Thanks,
Suryakiran
Reeza
Super User

@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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

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.

Discussion stats
  • 8 replies
  • 2935 views
  • 5 likes
  • 3 in conversation