NET/MASTER Network Control Language (NCL) Reference Manual
&SYS.ERROR.VALUEOK
System Variables
5–34 106126 Tandem Computers Incorporated
&SYS.ERROR.VALUEOK
The &SYS.ERROR.VALUEOK system variable indicates whether
&SYS.ERROR.VALUE contains information about an error. If the
&SYS.ERROR.VALUE system variable does contain a value, &SYS.ERROR.VALUEOK
is set to 1; otherwise, &SYS.ERROR.VALUEOK is set to 0.
This system variable can be used only in an ON error handler.
&SYS.ERROR.VALUEOK
Consideration
See also &SYS.ERROR.VALUE, &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 named ONPROC tests the
&SYS.ERROR.VALUEOK system variable, to see whether &SYS.ERROR.VALUE
contains any information about an error:
ONPROC: PROCEDURE
ON ERROR DO
IF &SYS.ERROR.VALUEOK THEN DO
WRITE DATA="THE VALUE OF &SYS.ERROR.VALUE IS ",
&SYS.ERROR.VALUE
END
RESUME
END
&A=10
&B=0
&C = &A / &B
END ONPROC
In the previous example, the test is positive, indicating that error information is
available; the value 10 is displayed.