COBOL Manual for TNS/E Programs (H06.03+)
Creating and Compiling HP COBOL Source
Programs
HP COBOL Manual for TNS/E Programs—520347-003
22-45
Diagnostic Messages
Compiler Warning Messages
A warning message reports a questionable condition. A warning does not prevent the
generation of code. You can suppress warning messages with the NOWARN directive.
For more information about the directives in Table 22-3, see Compiler Directives.
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.
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).
Example 22-16. Warning Message
** Warning 25 ** Blank continuation line
Table 22-3. Compiler Directives That Produce Optional Warnings
Directive Produces warnings for ...
DIAGNOSE-74 Statements that might behave differently in HP COBOL and COBOL 74
DIAGNOSE-85 Statements that might behave differently when compiled by the
COBOL85 and ECOBOL compilers
DIAGNOSEALL Multiple references to undefined identifiers (instead of the first one
only)
FIPS Statements as required by the Federal Information Processing
Standard (FIPS)
SUBSET HP extensions to ANSI COBOL and obsolete elements
Example 22-17. Error Message
** Error 44 ** Syntax error detected at token COUNTER










