FLAG

FLAG affects whether the compiler produces diagnostic messages at or above a specified severity level.

Syntax

Read syntax diagramSkip visual syntax diagramFLAG=*( x,y)NO
Default
FLAG=(I,I)
Note: The second severity level used in this syntax must be equal to or higher than the first.
x
I|W|E|S|U

Specifies that errors at or above the severity level specified are flagged and written at the end of the source listing.

ID Type Return code
I Information 0
W Warning 4
E Error 8
S Severe error 12
U Unrecoverable error 16
y
I|W|E|S|U

The optional second severity level specifies the level of syntax messages embedded in the source listing in addition to being at the end of the listing.

NO
Indicates that no error messages are flagged.
Note:
  • If the messages are to be embedded, SOURCE must be specified at compile time. Embedded messages enhance productivity because they are placed after the referenced source statement.
  • Specification of FLAG(W|E|S) might result in the loss of entire classes of messages from the Events records in the Associated Data (SYSADATA) file. For further details, see FLAG in the Enterprise COBOL Programming Guide.