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

7 Run-Time Error Handling
106160 Tandem Computers Incorporated 7–1
This section discusses how to handle errors detected during the execution of an NCL
process. These are called run-time errors. The section discusses the following topics:
Run-time errors and error messages
Handling run-time errors
Writing an error handler
Setting an error handler
Raising an error handler
Scope and error handling
System variables containing error information
Using the &SYSMSG variable
System-defined error handlers for specific conditions
Table 7-1 summarizes the core statements discussed in this section.
Table 7-1. Core Statements Used for Run-Time Error Handling
Core Statement Description
EXIT Returns from the current NCL procedure to the calling NCL procedure.
FLUSH Terminates an NCL process from any nesting depth.
ON Declares a routine to handle a specified error condition.
RESUME Resumes execution from an error handler at the statement following the one that
raised the error handler.
RETRY Retries the statement that raised the error handler.
REVERT Releases an error handler for the specified condition.
SIGNAL Raises a specified error handler.
For the complete syntax of core statements, refer to the NonStop NET/MASTER NCL
Reference Manual.
Note You must distinguish compilation errors from run-time errors. Compilation errors are errors detected
during the compilation of an NCL procedure before execution. If NCL detects any errors that prevent a
successful compilation, it displays informational messages that describe the errors. You must use these
messages to locate and correct the errors before you attempt to execute the NCL procedure again. You
cannot write an error handler to trap compilation errors: but you can use the NCLCHECK command from
the OCS command input line or perform a test compilation in Edit Services to locate these errors before
execution. These techniques are described in Section 4, “Initial NCL Procedure Development.”