SET WARNING command (C, C++, COBOL, and PL/I)

Controls display of the Debug Tool warning messages and whether exceptions are reflected to the C, C++, and PL/I programs. For COBOL programs, controls the ability to modify variables while you debug optimized code. The initial setting is ON.

Read syntax diagramSkip visual syntax diagram
                 .-ON--.      
>>-SET--WARNING--+-----+--;------------------------------------><
                 '-OFF-'      

ON
Displays the Debug Tool warning messages, and conditions such as a divide check result in a diagnostic message. For COBOL programs, prohibits the modification of variables while you debug optimized programs.
OFF
Suppresses the Debug Tool warning messages, and conditions raise an exception in the program. For COBOL programs, allows the modification of variables while you debug optimized programs.

Exceptions that occur due to interaction with you are likely to be due to typing errors and are probably not intended to be passed to the application program. However, you might want to raise a real exception in the program, for example, to test some error recovery code. (TRIGGER is not always appropriate for this because it does not set up the exception information.)

Usage notes

Example

Specify that conditions result in a diagnostic message.
SET WARNING ON;

Refer to the following topics for more information related to the material discussed in this topic.