NET/MASTER Network Control Language (NCL) Reference Manual
&SYS.ERROR.RETRYOK
System Variables
5–28 106126 Tandem Computers Incorporated
&SYS.ERROR.RETRYOK
The &SYS.ERROR.RETRYOK system variable indicates whether the statement causing
the error can be retried. The procedure is resumed from the statement that caused the
error.
This system variable can be used only in an ON error handler.
&SYS.ERROR.RETRYOK
The value of the variable is set to either 0 (zero; the procedure cannot be retried) or 1
(the procedure can be retried).
Considerations
See the RETRY verb in Section 3, “Verbs.”
See also the other &SYS.ERROR system variables.
Example
In the following example, the procedure PROC1 retries the statement that raised the
error condition (division by 0):
PROC1: PROCEDURE
ON ERROR DO
IF &SYS.ERROR.RETRYOK THEN DO
&B=1 /* CORRECT THE ERROR */
RETRY
END
END
&A=10
&B=0
/* DIVIDE BY ZERO */
&C=&A/&B
SAY " IT’S O.K. NOW "
END PROC1
In the previous example, after testing the &SYS.ERROR.RETRYOK system variable
and finding that the error can be retried, the procedure corrects the divisor and retries
the division.