PUSHPARMS and POPPARMS commands

From m204wiki
Jump to navigation Jump to search

The PUSHPARMS command saves all user resetable parameters(ie. no system/file parameters). No values may be specified with the command. After PUSHPARMS, the RESET command may be used to set the desired user parameters. Only one PUSHPARMS may be done per include level.

The POPPARMS command restores all user resetable parameters.

Command syntax

The general form of the commands is:

PUSHPARMS POPPARMS

Only one PUSHPARMS command can be active in a single INCLUDE level. When the INCLUDE level is closed, the parameter settings saved by the active PUSHPARMS command are automatically restored. They can also be explcitly restored with a POPPARMS command at the same INCLUDE level. A typical use of the PUSHPARMS command would be to set a specific parameter for a specific procedure in a subsystem so that the standard parameter settings are restored when the request had completed. For example:

PUSHPARMS RESET LECHO 0 begin ... procedure code end

When the procedure containing the PUSHPARMS command is closed, whether or not the code inside the Begin/End block ran successfully or got a request canceling error or even a compile error, the parameter setting is restored to what it was before the PUSHPARMS command. Note that adding a POPPARMS command after the End, while harmless, doesn't help, as the end of procedure restores the saved PUSHPARMS setting anyway and the explicit POPPARMS would never be seen in the case of errors.