bbalk 1200006543 Visits (2676)
There are three, perhaps overlooked, new features of Enterprise that let you "compile out" code either unconditionally or conditionally:
To cause the compiler to skip some code unconditionally, you could try to enclose it in comments. But this works only if that code itself contains no comments. However, as of the 3.9 release, you can enclose code in %DO SKIP; ... %END;, and then the compiler will unconditionally skip over the enclosed code.
To cause the compiler to skip over some code conditionally, you can enclose it in a %DO; ... %END; block that is conditional on the value of the SYSPARM compiler option. For example, this code
%if sysparm = 'test' %then %do;
put skip list( procname() || sourceline() );
would be compiled into your object deck only if you specified SYSPARM('test') as a compiler option. Using this option in this manner makes it easy to compile a production or a test version of your code from the same source file.
And if all your test code consists only of PUT FILE statements - and if PUT FILES are not used elsewhere in your code, you could cause the compiler to skip over that code conditionally by using the IGNORE( PUT ) compiler option introduced in the 4.1 release.