NET/MASTER Network Control Language (NCL) Programmer's Guide

System-Defined Error Handlers for Specific Conditions
Run-Time Error Handling
7–24 106160 Tandem Computers Incorporated
The ARITH_ERROR Error
Handler
If present, the ARITH_ERROR error handler traps overflow, underflow, and division-
by-zero errors that occur when performing arithmetic operations. This error handler is
set by the following ON statement:
ON ARITH_ERROR
statement
The following system variables are set specifically for this error handler:
System Variable Setting of System Variable
&SYS.ERROR.VALUE Contains the first incorrect term in an expression.
&SYS.ERROR.VALUEOK Contains 1 (TRUE) or 0 (FALSE).
&SYS.ERROR.VALUE2 Contains the second incorrect term in an expression.
&SYS.ERROR.VALUE2OK Contains 1 (TRUE) or 0 (FALSE).
Refer to the discussion on expressions and operators in the NonStop NET/MASTER
NCL Reference Manual for more information on performing arithmetic operations.
The FILE_ERROR Error
Handler
If present, the FILE_ERROR error handler traps errors resulting from the use of FILE
verbs. Errors include reading from an empty file or reading beyond the EOF, adding
an already existing record, deleting or retrieving a nonexistent record, and so on. This
condition causes an implicit RESUME statement to be executed. This error handler is
set by the following ON statement:
ON FILE_ERROR
statement
See Section 12, “Working With Files,” for more information on using files.
The FLUSH_ERROR Error
Handler
If present, the FLUSH_ERROR error handler traps the FLUSH command. Once
trapped, you cannot recover from the error and resume execution or retry the
statement causing the error: the NCL process terminates execution after the error
handler terminates. This error handler is set by the following ON statement:
ON FLUSH_ERROR
statement
See Section 8, “Executing NCL Procedures,” for more information on flushing an NCL
process.
Note The FLUSH_ERROR error handler does not trap the FLUSH core statement.
The LABEL_ERROR Error
Handler
If present, the LABEL_ERROR handler traps the case in which NCL cannot find a
label, the label is found but is an illegal name, the label is in an illegal position, the
label is too long (the maximum length (including the colon) is 250 characters), and so
on. NCL searches for constant labels during compilation. This error handler is set by
the following ON statement:
ON LABEL_ERROR
statement