Tuesday, March 26, 2019

How to find hidden macro in batch run

By default, it does not give out any information for macro compilation when the macro definition are %include. It is OK for most time. However, it may be helpful when you want to locate the macro when multiple versions exist. With system option MCOMPILENOTE, we can easily address this problem.
Similarly, we can use MEXECNOTE to get more details on macro execution.

Programmatically, we can add version information in macro description. See blow:
%macro test / des = 'Version 1.0';
%mend;

proc catalog;
contents cat=work.sasmacr; /* list macro description */
quit;