CANCEL


You use a CANCEL statement to cancel a process after detecting a serious processing problem. You can use CANCEL in any event point in any process to clear the screen, display the cancel message, and cancel the process. CANCEL provides an orderly termination of a process.

    ••••• CANCEL   ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
    (1)            (2)

(1) T/F execution conditions

(2) Cancel message (constant or TEMPn predefined field)

Using the Statement

Instead of displaying a fixed CANCEL message (as shown in the example), you can display a variable message. You do this by setting one of the TEMPn predefined fields to the desired message, and entering TEMPn in place of specific message text in the CANCEL statement.

Related PDFs

TEMPn

Related Statements

SET, SET TEMP

Example

The following example demonstrates a conditional execution of the CANCEL statement if a specified file is not available.

          IF EXIST TAR CUSTOMER            FAIL 0
    F     CANCEL   Customer File Does Not Exist -- Contact designer for assistance!