ERROR


ERROR can be used in any event point in an input process to display an error message, or to print an error message in an output or action process.

    ••••• ERROR    ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
    (1)            (2)

(1) T/F execution conditions

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

Using the Statement

Variable error messages can be displayed or printed by setting the predefined field TEMPn to the required message and entering TEMPn in place of a message in the ERROR statement.

When an error occurs, the image is redisplayed to the user with the error message blinking on line two of the status surface, and the terminal beeps. If more than one ERROR, WARNING, or MESSAGE statement is executed, the user can display the additional messages. The user must correct the problem before processing can continue with the next image.

In output processes, errors are printed on the report; in update, status, and subroutine processes errors are sent to the associated log. Each time an ERROR statement executes, the value of the predefined field ERRORS is incremented by one.

Related PDFs

ERRORS

Related Statements

WARNING, MESSAGE

Example

In this example, an ERROR statement followed by a BLINK statement are used to alert a user that the customer has exceeded their credit limit.

          IF       TAR CUSTOMER BALANCE           GT TAR CUSTOMER CREDIT LIMIT
    T     ERROR    Customer's balance exceeds credit limit!
    T     BLINK    TAR CUSTOMER BALANCE