The NOCOMPILE option goes a step further than the NOMREPLACE option and prevents a macro definition from being compiled. It can be used with the NOMREPLACE option to protect existing code from being overwritten. The MCOMPILE option is the default option.
The following macro definition will compile with the Put statement, writing the 'Macro Will Compile' value to the LOG:
%Macro Compile_Test;
%Put 'Macro Will Compile';
%Mend Compile_Test;
%Compile_Test;
However, with the NOMCOMPILE option switched on, we won't be able to compile the following macro definition, or any other macro definition in the session, for that matter, until the MCOMPILE option is switched off:
%Macro Compile_Test_Alt;
%Put “Macro Won’t Compile”;
%Mend Compile_Test_Alt;
%Compile_Test_Alt;
This produces the following LOG:
ERROR: Macro compilation...