RESULTS OF COMPILATION - IBM Mainframe

When the compiler finishes processing your source program, it will have produced one or more of the following, depending on which options you selected. The following list gives the result and the options you have to select to get those results:

  • Listing of the source program (SOURCE)
  • List of errors the compiler discovered in your program (FLAG)
  • Your object code (OBJECT and / or DECK with COMPILE)
  • Listing of object code in machine and assembler language (LIST)
  • Map of the data items in your program (MAP)
  • Map of the relative address in your object code (OFFSET)
  • Sorted cross-reference listing of procedure-program and data-names (XREF)
  • A system dump, if compilation ended with abnormal termination (requires SYSUDUMP, SYSABEND, or SYSMDUMP DD statement) (DUMP)

Listing output from compilation will be in the data set defined by SYSPRINT; object output will be in SYSLIN or SYSPUNCH. Progress and diagnostic messages may be directed to the SYSTERM data set, as well as included in the SYSPRINT data set.

Your immediate concern will be the errors the compiler found in your program. If the compiler found no errors, you can go to the next step in the process: link-editing your program. (If you used compiler options to suppress object code generation, you must recompile to obtain it.)

Save the listings you produced during compilation. Their use will come later, during the test-execution stage of your work, should you need to debug or tune.

Compiler-Detected Errors

As the compiler processes your source program, it checks for errors you might have made in violation of the rules of the VS COBOL II language. For each such error discovered, the compiler issues a message. These messages are included in the compilation listing (subject to the FLAG option). Each message does three things:

  • Explains the nature of your error
  • Identifies the compiler phase that detected the error
  • Identifies the severity level of the error

Wherever possible, the message provides specific instructions for correcting the error.

Compiler Error Messages

The messages for errors found during processing of compiler options, CBL and PROCESS statements, or BASIS, COPY and REPLACE statements are displayed near the top of your listing. The messages for compilation errors found in your program (ordered by line number) are displayed near the end of the listing for each program. A summary of all errors found during compilation is displayed near the bottom of your listing. Each message issued by the compiler is of the following form:

Compiler Error Messages

  • nnnnnn - The number of the source statement of the last line the compiler was processing. Source statement numbers are listed on the source printout of your program. If you specified the NUMBER option and compile time, these are your original source program numbers. If you specified NONUMBER, the numbers are those generated by the compiler.
  • 1GY - The prefix that identifies this message as coming from the COBOL compiler.
  • pp - Two characters that identify which phase of the compiler discovered the error. As an application programmer, you can ignore this information, unless you are diagnosing a suspected compiler error.
  • xxxx - A 4-digit number that identifies the error message.
  • L - A character that indicates the severity level of the error—I, W, E, S, or U

Remember that if you used the FLAG option to suppress messages, there may be additional errors in your program.

Compiler Error Message Codes

Errors the compiler can catch fall into five categories of severity:

  • I (Informational, Return code = 0) - An informational-level message is an aid to the user. No action is required from the user and the program will execute correctly as it stands.
  • W (Warning, Return Code=4) - A warning-level message calls attention to a possible error. It is probable that the program will execute correctly as written.
  • E (Error, Return Code=8) - An error-level message indicates a condition that is definitely an error. The compiler has attempted to correct the error but the results of program execution may not be what the user expects. The user should correct the error.
  • S (Severe, Return Code=12) - A severe-level message indicates a condition that is a serious error. The compiler was unable to correct the error. The program will not execute correctly, and execution should not be attempted.
  • U (Unrecoverable, Return Code=16) - An unrecoverable-level message indicates an error condition of such magnitude that the compilation was terminated.

Compiler Error Message Codes

Compiler Error Message Codes

The following listing gives an example of the error listing:

example of the error listing


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM Mainframe Topics