Choosing compiler options for debugging

Compiler options affect the size of your load module and the amount of z/OS® Debugger functionality available to you. z/OS Debugger uses information such as statements and symbol tables to gain control of a program, run the program statement-by-statement or line-by-line, and display information about your program.

To learn more about how debug tables help z/OS Debugger debug your program, read the following topics:
Table 1. Compiler options for in-service products
Compiler or assembler Compiler options you will use
Enterprise COBOL for z/OS Version 6.2 and later TEST(EJPD,NOSEPARATE/SEPARATE(DSNAME/NODSNAME),SOURCE/NOSOURCE)
Enterprise PL/I, Version 6 For 31-bit programs, use either of the following:
  • TEST(ALL,NOHOOK,SYM,SEPARATE,NOSOURCE) and LISTVIEW
  • TEST(ALL,NOHOOK,SYM,NOSEPARATE,SOURCE) and LISTVIEW1
For 64-bit programs, use TEST(ALL,NOHOOK,SYM,NOSEPARATE) and LISTVIEW.
Enterprise PL/I, Version 5 Release 32 (31-bit) TEST(ALL,NOHOOK,SYM,SEPARATE) and LISTVIEW
Open XL C/C++ for z/OS 1.1 and later -gdwarf
z/OS XL C/C++ , Version 2.4 and later DEBUG(FORMAT(DWARF),NOFILE) GOFF
IBM® High Level Assembler (HLASM) Version 1 Release 63 ADATA
Open Enterprise SDK for Go 1.21 and 1.22 No compiler option is needed. DWARF data is always produced for Go and cannot be turned off.
  1. For Enterprise PL/I Version 6.1 or later with APAR PH50085 installed, when you compile with LP(32), you can also use TEST(ALL,NOHOOK,SYM,NOSEPARATE,SOURCE) and LISTVIEW.
  2. Support for Enterprise PL/I for z/OS Version 5 (31-bit) is the same as that for Version 4 in z/OS Debugger.
  3. For more information, see Preparing an assembler program.
Table 2. Compiler options for out-of-service products
Compiler or assembler Compiler options you will use
Enterprise COBOL for z/OS Version 5 and Version 6.11 compiled with the TEST compiler option TEST(EJPD,SOURCE)
Enterprise COBOL for z/OS Version 4 compiled with the TEST compiler option TEST(NOHOOK,SEPARATE,EJPD)
Enterprise COBOL for z/OS Version 3 or Version 4 compiled with the NOTEST compiler option 2 NOTEST,NOOPTIMIZE,SOURCE,MAP,XREF,LIST(or OFFSET)
Enterprise COBOL for z/OS and OS/390®, Version 3 TEST(NONE,SYM,SEPARATE)
COBOL for OS/390 & VM TEST(NONE,SYM,SEPARATE)
COBOL for MVS & VM TEST(ALL,SYM)
AD/Cycle COBOL/370 Version 1 Release 1 TEST(ALL,SYM)
VS COBOL II Version 1 Release 3 and Version 1 Release 4 (for programs compiled with the NOTEST compiler option and linked with the Language Environment® library.) 2 NOTEST,NOOPTIMIZE,SOURCE,MAP,XREF,LIST(or OFFSET)
VS COBOL II Version 1 Release 3 and Version 1 Release 4 (for programs compiled with the NOTEST compiler option and linked with a non-Language Environment library.) 2 NOTEST,NOOPTIMIZE,SOURCE,MAP,XREF,LIST(or OFFSET)
VS COBOL II Version 1 Release 3 and Version 1 Release 4 (for programs compiled with the TEST compiler option and linked with the Language Environment library.) TEST
OS/VS COBOL, Version 1 Release 2.4 2 NOTEST,SOURCE,DMAP,PMAP,VERB,XREF,NOLST,NOBATCH,NOSYMDMP,NOCOUNT
Enterprise PL/I, Version 4 or Version 5.1 and 5.23 (31-bit) TEST(ALL,NOHOOK,SYM,SEPARATE) and LISTVIEW
Enterprise PL/I, Version 3.8 or later TEST(ALL,NOHOOK,SYM,SEPARATE) and LISTVIEW
Enterprise PL/I, Version 3.7 TEST(ALL,NOHOOK,SYM,SEPARATE,SOURCE)
Enterprise PL/I, Version 3.5 or later TEST(ALL,NOHOOK,SYM,SEPARATE)
Enterprise PL/I, Version 3.4 TEST(ALL,NOHOOK,SYM)
Enterprise PL/I, Version 3.1 through Version 3.3 TEST(ALL,SYM)
PL/I for MVS & VM TEST(ALL,SYM)
OS PL/I Version 2 Release 1, Version 2 Release 2, and Version 2 Release 3 TEST(ALL,SYM)
C/C++ feature of z/OS, Version 1.6 or later (31-bit) DEBUG(FORMAT(DWARF))
  • C feature of OS/390 Version 2 Release 6 or later
  • C feature of z/OS, Version 1.5 or earlier
TEST(HOOK)
  • AD/Cycle C/370 Version 1 Release 1
  • C/C++ for MVS/ESA Version 3 Release 1 or later
  • C++ feature of OS/390 Version 2 Release 6 or later
  • C++ feature of z/OS, Version 1.5 or earlier
TEST
IBM High Level Assembler (HLASM), Version 1 Release 4, Version 1 Release 54 ADATA
  1. Support for Enterprise COBOL for z/OS Version 6 is a superset of that for Version 5 in z/OS Debugger.
  2. See Preparing a LangX COBOL program for information on how to prepare a program of this type.
  3. Support for Enterprise PL/I for z/OS Version 5 (31-bit) is the same as that for Version 4 in z/OS Debugger.
  4. For more information, see Preparing an assembler program.