NET/MASTER Network Control Language (NCL) Reference Manual

&SYS.ERROR.VALUE
System Variables
106126 Tandem Computers Incorporated 5–33
&SYS.ERROR.VALUE The &SYS.ERROR.VALUE system variable contains the value that caused the error.
&SYS.ERROR.VALUE is null if no value is relevant.
This system variable can be used only in an ON error handler.
&SYS.ERROR.VALUE
Consideration
See also &SYS.ERROR.VALUEOK, &SYS.ERROR.VALUE2, and
&SYS.ERROR.VALUE2OK. These system variables either hold the value(s) that
caused the error, or indicate that such error information is available.
Example
In the following example, the procedure ONPROC contains an arithmetic error. It
displays the value that caused the error. In this example there are two values that
cause the error: 10 and 0 (zero). The &SYS.ERROR.VALUE system variable contains
the first (or only) value that caused the error. The value 10 is displayed:
ONPROC: PROCEDURE
ON ERROR DO
WRITE DATA="THE VALUE OF &SYS.ERROR.VALUE IS ",
&SYS.ERROR.VALUE
RESUME
END
&A=10
&B=0
&C = &A / &B
END ONPROC