Debug information changes with Enterprise COBOL 5 and 6
Programs compiled with Enterprise COBOL 5 or 6 will have different debug information than that of programs compiled with previous versions of the compiler.
- 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.
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
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 z/OS® Debugger. When theTEST(NOSOURCE)
compiler option is specified, the generated DWARF debug information does not include the expanded source code.Tip: If you are using IBM z/OS Debugger, it is recommended that you specifyTEST(SOURCE)
(for COBOL 5 or 6.1) orTEST(SEPARATE,SOURCE)
(for COBOL 6.2 and later) to get the most debugging functionality while controlling module size:- With
TEST(SOURCE)
, the debug information is saved in aNOLOAD
debug segment in the program object. - With
TEST(SEPARATE,SOURCE)
, the debug information is saved in a separate debug file.
- With
- You can use the
NOTEST(DWARF)
compiler option to include basic DWARF debugging information in the program object. You cannot debug such programs with z/OS Debugger, but you can getNOTEST
optimization and still enable application failure analysis tools, such asCEEDUMP
output and IBM Fault Analyzer. - To have no debugging information in the program object, use the
NOTEST(NODWARF)
option.
For details about the TEST
option,
see TEST in the Enterprise COBOL for z/OS Programming Guide.
For details about debugging COBOL programs using IBM z/OS Debugger, see Choosing TEST or NOTEST compiler suboptions for COBOL programs in the IBM z/OS Debugger User's Guide.
- Type F 'end of c' on the command line (use the ISPF FIND
command to find the header:
End of compilation
). - Press Enter.
- (Optional) Press Page back.
With Enterprise COBOL 6.2, the diagnostic messages are again at the end of the listing, as with Enterprise COBOL 4 and earlier compilers.
Changes that apply to Enterprise COBOL 6 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.
- Enterprise COBOL 6 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:
- Enter ipcs -q to list queues.
- Find queues associated with your user ID.
- 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.
-
PPA1 changes in Enterprise COBOL 6.3
Starting in Enterprise COBOL 6.3, bit 30 of flag3 (offset X'1C') of PPA1 may be set to indicate that the
Extended Flag field
is present. If this bit is set, the extended flag will have bit 0 set to indicate thatVector Registers Area
is in the optional area. This should not affect tools or program code that are accessing PPA1 according to the Language Environment® interface. Refer to the z/OS Language Environment Vendor Interfaces for details about PPA1.
When debugging your COBOL programs, you will find that there have been multiple improvements and behavior changes introduced with Enterprise COBOL 5 and 6. For details about changes in debugging with IBM z/OS Debugger, see z/OS Debugger changes with Enterprise COBOL 5 and 6.