Supported compilers and options for code coverage in remote debug mode

In remote debug mode, programs written in COBOL, PL/I, C, and Assembler can be supported if they are compiled with certain compiler options.

Code Coverage is supported for Enterprise COBOL for z/OS® and OS/390® Version 3 and Enterprise COBOL for z/OS Version 4, 5, and above in 31-bit mode. The following compiler options are required to ensure that the SYSDEBUG side file or program object contains the program source:
  • Enterprise COBOL for z/OS Version 5 and above - TEST.
  • Enterprise COBOL for z/OS Version 4 - TEST(SEPARATE) with NOHOOK recommended but not required.
  • Enterprise COBOL for z/OS and OS/390 Version 3 - TEST(SEPARATE) with NONE recommended but not required.
Code Coverage is supported for Enterprise PL/I for z/OS Version 4.2 and above in 31-bit mode. The following compiler options are required to ensure that the SYSDEBUG side file contains the complete expanded program source and statement table:
  • TEST(SEPARATE) - the ALL and NOHOOK sub-options are also recommended but not required.
  • GONUMBER(SEPARATE) - required to produce the statement table in the SYSDEBUG side file.
  • MACRO or PP(MACRO) - required if there are %INCLUDE statements in the source. Using the MACRO suboption CASE(ASIS) will leave the case of the source unchanged.
  • LISTVIEW(AFTERALL) - required if files, EXEC CICS® commands, or SQL code are included in the source.
  • LISTVIEW(SOURCE) - coverage of any file on the %INCLUDE statement that has executable lines is included in the result. In addition, the %INCLUDE line is marked as covered if all the executable lines are hit, or not covered if not all lines are hit. Any files without executable lines are omitted from the code coverage result.
Code Coverage is supported for IBM® z/OS XL C in 31-bit mode. The following compiler options and program preparation are required:
  • You must run the following 2-stage compile process.

    The first stage preprocesses the program, so the IBM z/OS Debugger has access to fully expanded source. The second stage compiles the program.

  • The first compile stage specifies compiler options PP(COMMENTS,NOLINES) to expand INCLUDEs and macros. The output is SYSUT10 DD. SYSUT10 DD is the expanded source file and is the input for the second compiler stage. Modify the SYSUT10 DD to enable z/OS Debugger, by saving it in an expanded source library and specify a member name that is equal to the primary entry point name or CSECT name of your application program.
  • For the second compiler stage, use the DEBUG(FORMAT(DWARF)) option to place the debug data in a separate file in one of these ways:
    • Use DEBUG(FORMAT(DWARF),HOOK(LINE,NOBLOCK,PATH),SYMBOL,FILE(location)).
    • Or for better performance, use DEBUG(FORMAT(DWARF),NOHOOK,SYMBOL,FILE(location)).
  • You cannot use an .mdbg file.
  • You cannot use DEBUG(FORMAT(ISD)) or TEST.

Code Coverage is supported for Language Environment® assembler and non-Language Environment assembler. The assembler option ADATA is required and the SYSADATA output data set must be converted to LANGX file format.

An LDD command must be provided for each assembler routine to load debug data. You can add LDD commands in the commands file or preference file. The following example shows a DD statement for the commands file:
//INSPIN DD *,DLM='/*'   
       LDD BAS1;         
       LDD BAS2;         
       LDD BAS3;         
/*
For non-Language Environment assembler, add the environment variable EQA_STARTUP_KEY to the EQANMDBG DD inline data string. See the following example for reference:
// EXEC PGM=EQANMDBG
//EQANMDBG DD *,DLM='/*'
BAS1,TEST(ALL,INSPIN,PROMPT,TCPIP&9.52.237.94%8005:*),
ENVAR("EQA_STARTUP_KEY=CC")
/*