Debug information changes with Enterprise COBOL Version 5 and Version 6

Programs compiled with Enterprise COBOL V5 or V6 will have different debug information than that of programs compiled with previous versions of the compiler.

IBM® Enterprise COBOL Version 5 and Version 6 solves the dilemma of debugging information. In the past you had 2 choices:
  • Have the debug data always with the executable at a cost of a large load footprint, or
  • Have separate debug data but also have the challenge of keeping it synchronized with the application and finding it when needed.
Now you have the best of both worlds. With NOLOAD debug segments in the program object, the debug data does not increase the size of the loaded program, it always matches the executable and is always available so there is no need to search lists of data sets.

TEST option changes

With Enterprise COBOL V5 and V6.1, there have been changes to the TEST compiler option used to generate debuggable versions of your application and to the NOTEST option.
  • When the TEST option is specified, DWARF debug information is included in the application module.
  • If the SOURCE suboption is specified, the DWARF debug information includes the expanded source code, and the compiler listing is not needed by IBM Debug Tool. When the TEST(NOSOURCE) compiler option is specified, the generated DWARF debugging information does not include the expanded source code.
  • You can use the NOTEST(DWARF) compiler option to include basic DWARF debugging information in the program object. You cannot debug such programs with Debug Tool, but you can get NOTEST optimization and still enable application failure analysis tools, such as CEEDUMP output and IBM Fault Analyzer.
  • To have no debugging information in the program object, use the NOTEST(NODWARF) option.

Start of changeEnterprise COBOL V6.2 supports generating the debug information into side files by compiling the program with the TEST(SEPARATE) option.End of change

For details about TEST changes, see TEST in the Enterprise COBOL for z/OS Programming Guide

Listing information changes

With Enterprise COBOL V5 and V6.1, the diagnostic messages are not at the bottom of the listing. Take the following steps to get to the diagnostic messages part of the listing:
  1. Type F 'end of c' on the command line (use the ISPF FIND command to find the header: End of compilation).
  2. Press Enter.
  3. (Optional) Press Page back.

Start of changeWith Enterprise COBOL V6.2, the diagnostic messages are again at the bottom of the listing, as with Enterprise COBOL V4 and earlier compilers.End of change

Changes apply to Enterprise COBOL V6 only

  • The allocation and management of WORKING-STORAGE SECTION have been changed since Enterprise COBOL V5. This does not affect the execution of the COBOL program. Tools or programs that need to locate the starting address of the WORKING-STORAGE SECTION might be affected. For details, see WORKING-STORAGE SECTION changes.
  • Start of changeEnterprise COBOL V6 uses interprocess communication (IPC) message queues within the compiler. Therefore, if you compile in z/OS® UNIX with cob2 and the compiler experiences an internal error and gets terminated with a KILL signal, you will need to query any message queues that are left over when the compiler is killed and remove the stale message queues. You can remove the stale message queues with the following z/OS UNIX commands:
    1. Enter ipcs -q to list queues.
    2. Find queues associated with your user ID.
    3. Enter ipcrm -q to delete queues.

    If you compile in z/OS batch, you do not have to remove stale message queues after a compiler error.

    End of change

When debugging your COBOL programs, you will find that there have been a large number of improvements and behavior changes introduced with Enterprise COBOL V5 and V6. For details about changes in debugging with IBM Debug Tool, see Debug Tool changes with Enterprise COBOL Version 5 and Version 6.