Acting Upon Compiler Messages; Compiler Abends - IBM 5280 Programmer's Manual

Distributed data system, cobol
Hide thumbs Also See for 5280:
Table of Contents

Advertisement

for details. If you don't specify the FLAG option. the compiler wjJJ issue
311
five types of messages described above: the compiler always lists
unrecoverable errors regardless of the FLAG specification.)
Acting Upon Compiler Messages
Compiler Abends
All messages except information messages should be acted upon, even if the
compiler has been able to 'fix' the error. The compiler, in making an
assumption as to the intended meaning of the erroneous source statement, can
introduce a further error which in turn can produce another error, and so on.
When this occurs, the compiler issues a number of diagnostic messages that
may all be caused either directly or indirectly by one error.
It is recommended that you use the the flag option lor Was described under
FLAG
or
NOFLAG in Chapter 7. Using another FLAG option may suppress
an error message needed to debug your program.
There are four types of errors that cause the compiler to cease normal
processing and end abnormally.
• Source Program Content - A source program may be too large for the
compiler to process in its current configuration.
• User Errors - Defining compiler data sets with improper attributes or
insufficient space are examples of user errors. Almost all of these
conditions are recognized by the compiler and an appropriate diagnostic
message is issued. A few user errors may cause further errors that mask
the true problem.
• Compiler Logic Errors - An unexpected condition can cause a compiler
phase to stop processing or a further type of error to occur such as a
program check. Compiler logic errors are sometimes recognized by the
compiler and an appropriate diagnostic message issued, but more often the
result is an abnormally terminated compilation thought to be caused by a
user programming error.
• System Errors - Hardware errors and programming logic errors within
the operating system are examples of system errors. Because these types of
errors are not recognized by the compiler, the true cause of the error will
not be clear. Most hardware errors, however, are processed by special
system routines that can produce diagnostic messages to the console and
listing file that may enable the operator to correct the error and rerun the
job. These messages can be found in the appropriate Messages manual for
the host system on which your compiler runs.
The compiler sets a return code after compilation to reflect any error
conditions. See Appendix D for the return codes and their possible causes.
The code set and the action taken for each error is as follows:
• If the error occurs in the compiler initialization phase, an immediate return
is made to the operating system and no further output is produced. The
return code is 1000 and is added to the internal compiler error code. The
compiler return codes are given in Appendix D.
• If the error occurs in the compiler termination phase, return is made to the
operating system but additional formatted debugging information is
produced. The return code is 2000 and is added to the internal compiler
error code.
9- 2
IBM 5280 COBOL Programmer's Guide

Advertisement

Table of Contents
loading

Table of Contents