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

Handling Run-Time Errors
Run-Time Error Handling
106160 Tandem Computers Incorporated 7–3
The following screen shows the results of attempting to execute the procedure three
times:
(13:47) --------------------- OPERATOR CONTROL SERVICES ----------------------
START ZEX0701N 10 A
NNM1004 NCLID 002032: ZEX0701N 3 ERROR TYPE_ERROR CODE 4
START ZEX0701N 10 0
NNM1004 NCLID 002033: ZEX0701N 3 ERROR ARITH_ERROR CODE 10
START ZEX0701N 10 2
10 divided by 2 is 5
NNM1005 START ZEX0701N PROCESSING COMPLETE. NCLID 002034
_____________________________________________________________________________
---------- ------------------ NonStop NET/MASTER D30 ---------------- --------
M=>
The values entered are 10 and A (incorrectly), 10 and 0 (incorrectly), and 10 and 2
(correctly). When NCL detects an error, it terminates execution of the NCL process.
Note If an NCL process terminates with an error message, message number NNM1005, which indicates the
completion of an NCL process, is not displayed on the screen.
Handling Run-Time
Errors
To handle run-time errors, you must complete the following three steps:
1. Write an error handler before executing the NCL procedure.
2. Ensure that the error handler is set before an error occurs.
3. Raise the error handler when an error errors.
These three steps are described in the following pages.