NET/MASTER Network Control Language (NCL) Reference Manual

&SYS.ERROR.RESUMEOK
System Variables
106126 Tandem Computers Incorporated 5–27
&SYS.ERROR.RESUMEOK
The &SYS.ERROR.RESUMEOK system variable indicates if the procedure can be
resumed.
This system variable can be used only in an ON error handler.
&SYS.ERROR.RESUMEOK
The value of the variable is set to either 0 (zero; the procedure cannot be resumed) or 1
(the procedure can be resumed).
Considerations
The procedure is resumed from the statement immediately after the one that
caused the error.
See the RESUME verb in Section 3, “Verbs.”
See also the other &SYS.ERROR system variables.
Example
In the following example, the procedure named ZERO_DIV has an arithmetic error
that is caused by attempting to divide by 0 (zero). The &SYS.ERROR.RESUMEOK
system variable is tested to see if the error can be ignored and processing continued. It
can in this example:
ZERO_DIV: PROCEDURE
ON ERROR DO
SAY "WE HAVE A DIVIDE BY ZERO ERROR"
If &SYS.ERROR.RESUMEOK THEN
RESUME
END
&A=10
&B=0
/* DIVIDE BY ZERO */
&C=&A/&B
SAY "WE HAVE NOW RESUMED AFTER A ZERO DIVIDE"
END ZERO_DIV