This configuration variable controls whether a warning message is printed and an error raised for the following conditions:
- when non-numeric data is used in a context where numeric data is required
- when there is a reference modification range error
By default, the runtime silently corrects reference modification range errors as follows:
- A start reference less than 1 is treated as 1. For example, var(0:3) is treated as var(1:3).
- A length reference less than 0 is treated as 0. Moving a zero-byte item is equivalent to moving spaces to the destination
item. A zero-byte destination is not affected by the move. In a STRING statement, a length of zero for a string source is
treated as 1, not 0.
- A start plus length reference that is past the end of the item is treated as meaning to the end of the item. For example,
if the var is a PIC X(5) item, var(4:23) is treated as var(4:2).
WARNINGS can take the following values:
||(off, false, no) No warning is printed.
||(on, true, yes) A warning is printed. This is the default.
||A warning is printed or sent to the error file. If you are in the debugger, an automatic breakpoint occurs.
||For a non-numeric error, a warning is printed, an intermediate error is generated that calls the installed error procedures,
if any, and the runtime is halted. For more information on error procedures, see
Note: The setting you select for WARNINGS applies to reference modifier range errors when the start plus length reference is past
the end of the item. Reference modifiers that are equal to or less than zero are always silently corrected as described above.