NET/MASTER Network Control Language (NCL) Programmer's Guide
Writing an Error Handler
Run-Time Error Handling
106160 Tandem Computers Incorporated 7–13
If you enter an invalid denominator, an error handler displays an error message,
substitutes the valid denominator of 1, and retries the statement raising the error.
The line that can raise the ON condition, and the line that is retried, in this example is
the following:
SAY "100 divided by "&1" is "100/&1
Entering ZZZZZ rather than a number terminates execution of the NCL process
normally.
The following screen shows the results of executing the procedure:
(14:34) --------------------- OPERATOR CONTROL SERVICES ----------------------
START ZEX0707N
Divide 100 by what number?
Please enter ZZZZZ or a number
|NM1060 PROCEDURE ZEX0707N NCLID 2052 PAUSED
GO ID=2052 17
100 divided by 17 is 5.88235294117647
Divide 100 by what number?
Please enter ZZZZZ or a number
|NM1060 PROCEDURE ZEX0707N NCLID 2052 PAUSED
GO ID=2052 ABC
ABC is an invalid denominator
Substituting a denominator of 1
100 divided by 1 is 100
Divide 100 by what number?
Please enter ZZZZZ or a number
|NM1060 PROCEDURE ZEX0707N NCLID 2052 PAUSED
GO ID=2052 ZZZZZ
You have entered ZZZZZ
Normal termination
NNM1005 START ZEX0707N PROCESSING COMPLETE. NCLID 002052
---------- ------------------ NonStop NET/MASTER D30 ---------------- --------
M=>
The values entered are 17 (correctly), ABC (incorrectly), and ZZZZZ, which terminates
execution of the NCL process.