COBOL Manual for TNS/E Programs (H06.08+, J06.03+)

Table 109 Compiler Directives That Produce Optional Warnings (continued)
Produces warnings for ...Directive
Statements as required by the Federal Information Processing Standard (FIPS)FIPS
HP extensions to ANSI COBOL and obsolete elementsSUBSET
For more information about the directives in Table 109, see Compiler Directives (page 533).
Compiler Error Messages
An error message reports a serious violation of HP COBOL syntax or semantics. At the first error
message, the compiler stops generating code for the current program unit and deletes any code
that it has already generated for that program unit. You cannot suppress error messages.
Example 245 Error Message
** Error 44 ** Syntax error detected at token COUNTER
Like many error messages, this example reports the identifier that the compiler was processing or
seeking when it detected the error (in this case, COUNTER).
Although the compiler stops generating code when it encounters the first error, it continues with
the compilation, reporting as many diagnostic messages as it can. Because an error can leave the
compiler with incorrect or incomplete information, the compiler might report errors in later statements
that are actually correct. (The later errors are side effects of the earlier ones.) If you do not
understand certain error messages, fix the errors you do understand and the others might disappear
or be expressed in an understandable way in the next compilation.
If the compiler finds errors in any program in the IN file, it does not produce any object programs
(that is, it produces no object file).
Compiler Failure Messages
A failure message reports a condition so severe that the compiler is unable to continue. Any code
that the compiler has already generated during the current compilation session is lost. You cannot
suppress failure messages.
Example 246 Failure Message
*** Failure:
--> message-text [Warning message-number]
The brackets are part of the message, not indicators that the bracketed material is optional.
Error Files
The compiler directive ERRORFILE causes the compiler to document its warning and error messages
in an error file. For each compiler warning or error message, the compiler writes one record to
the error file. Each record contains this information:
The fully qualified, local file name of the source file in which the warning or error occurred
If you specified a DEFINE name for the name of the source file, then this entry is the file name
that the DEFINE produced.
The line number that the HP editor (EDIT or TEDIT) assigned to the line in which the warning
or error occurred
The column number in which the warning or error occurred
The warning or error message text
Understanding and Controlling the Compiler Listing 775