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.
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.
In the following example, a warning is issued if the user does not enter a tax code on a customers record.
CUSTOMER TAX CODE EQ
T WARNING No sales tax will be collected for this customer.