WARNING can be used to display a warning message in an input process, or to print a warning message in an output or action process.

    ••••• WARNING  ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
    (1)            (2)

(1) T/F execution conditions

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

Using the Statement

Variable warning 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 WARNING statement.

When a warning occurs, the image is redisplayed to the user with the warning message blinking on line two of the status surface. If more than one ERROR, WARNING, or MESSAGE statement is encountered, the user can display the additional messages.

In output processes, errors and warnings are printed on the report and in update, status, and subroutine processes, they are printed to a log.

Related PDFs


Related Statements



In the following example, a warning is issued if the user does not enter a tax code on a customer’s record.

          IF       TAR CUSTOMER TAX CODE          EQ
    T     WARNING  No sales tax will be collected for this customer.