Linking Db2 programs for debugging

To debug Db2® programs, you must link the output from the compiler into your program load library. You can include the user runtime options module, CEEUOPT, by doing the following:
  1. Find the user runtime options program CEEUOPT in the Language Environment® SCEESAMP library.
  2. Change the NOTEST parameter into the desired TEST parameter. For example:
    old:  NOTEST=(ALL,*,PROMPT,INSPPREF),
    new:  TEST=(,*,;,*),

    If you are using remote debug mode, specify the TCPIP suboption, as in the following example:

    TEST=(,,,TCPIP&&9.2404.79%8001:*)
    Note: Double ampersand is required.

    If you are using full-screen mode using a dedicated terminal without Terminal Interface Manager, specify the MFI suboption with a VTAM® LU name, as in the following example:

    Test=(,,,MFI%TRMLU001)

    If you are using full-screen mode using the Terminal Interface Manager, specify the VTAM suboption with your user ID, as in the following example:

    Test=(,,,VTAM%USERABCD)
  3. Assemble the CEEUOPT program and keep the object code.
  4. Link-edit the CEEUOPT object code with any program to start z/OS® Debugger.
The modified assembler program, CEEUOPT, is shown below.
*/****************************************************************/
*/* LICENSED MATERIALS - PROPERTY OF IBM                         */
*/*                                                              */
*/* 5694-A01                                                     */
*/*                                                              */
*/* (C) COPYRIGHT IBM CORP. 1991, 2001                           */
*/*                                                              */
*/* US GOVERNMENT USERS RESTRICTED RIGHTS - USE,                 */
*/* DUPLICATION OR DISCLOSURE RESTRICTED BY GSA ADP              */
*/* SCHEDULE CONTRACT WITH IBM CORP.                             */
*/*                                                              */
*/* STATUS = HLE7705                                             */
*/****************************************************************/
CEEUOPT  CSECT
CEEUOPT  AMODE ANY
CEEUOPT  RMODE ANY
         CEEXOPT TEST=(,*,;,*)
         END

The user runtime options program can be assembled with predefined TEST runtime options to establish defaults for one or more applications. Link-editing an application with this program results in the default options when that application is started.

If your system programmer has not already done so, include all the proper libraries in the SYSLIB concatenation. For example, the ISPLOAD library for ISPLINK calls, and the Db2 DSNLOAD library for the Db2 interface modules (DSNxxxx).

Refer to the following topics for more information related to the material discussed in this topic.