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