The %PUSH directive allows you to save the current status of the %PRINT, %NOPRINT, and %OPTION directives in a "push down" stack on a last-in, first-out basis. You can restore this saved status later, also on a last-in, first-out basis, by using the %POP directive.
A common use of %PUSH and %POP directives is in included files and macros.
|
In the following example, statements 1, 2, 3, S4, S5, and 4 are printed in the listings. All others are not printed. Initially, LANGLVL(SAA) is in effect; then, LANGLVL(SAA2) is in effect for the entire included file Second.

The original setting is restored following the %POP directive in Second.