Instructions and Conditions

The instructions to set a trap for errors are SIGNAL and CALL. Example formats are:

SIGNAL ON condition NAME trapname
CALL   ON condition NAME trapname

The SIGNAL ON instruction initiates an exit subroutine that ends the program. The CALL ON instruction initiates a subroutine that returns processing to the clause immediately following the CALL ON instruction. Use CALL ON when you want to recover from a command error or failure.

The two command conditions that can be trapped are: