Obtaining an application trace for a stored procedure

Obtaining an application trace for a stored procedure requires modifying the initialization file.

Procedure

To obtain an application trace:

  1. Set APPLTRACE=1 and APPLTRACEFILENAME="DD:dd-name" in the common section of the Db2 ODBC initialization file as follows:
    [COMMON]
    APPLTRACE=1
    APPLTRACEFILENAME="DD:APPLTRC"
    dd-name is the name of a DD statement that is specified in the JCL for the stored procedure address space.
  2. Specify an JCL DD statement in the JCL for the stored procedure address space.
    The DD statement references a preallocated sequential data set with DCB attributes RECFM=VBA,LRECL=137 or a z/OS® UNIX environment HFS file to contain the client application trace, as shown in the following examples:
    //APPLTRC DD DISP=SHR,DSN=CLI.APPLTRC
    //APPLTRC DD PATH='/u/cli/appltrc'