BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Is there any way to see the log generated by a macro executed using run_macro?
2 REPLIES 2
Peter_C
Rhodochrosite | Level 12
zBig
I'm not sure what logging you hope for.
what have you tried?
I tried the example in the online doc and repeated the final step using the usual macro debugging options
679 option symbolgen mlogic mprint;
680 data _null_;
681 a = 5.3;
682 b = 0.7;
683 p = .;
684 p = subtract_macro(a, b);
685 put p=;
686 run;

MLOGIC(TESTMACRO): Beginning execution.
MLOGIC(TESTMACRO): %LET (variable name is P)
SYMBOLGEN: Macro variable A resolves to 5.3
SYMBOLGEN: Macro variable B resolves to 0.7
MLOGIC(TESTMACRO): Ending execution.
p=4.6
NOTE: DATA statement used
deleted_user
Not applicable
Thanks for reply. I mean the full "normal" log, with e.g. all notes like
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.00 seconds
Within the macro which is executed via run_macro you can have several datasteps/proc calls. I need to see all what is reported to normal log in such situation.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 2 replies
  • 1594 views
  • 0 likes
  • 2 in conversation