Tracing IBM Data Server Driver for JDBC and SQLJ C/C++ native driver code

To debug applications that use IBM Data Server Driver for JDBC and SQLJ type 2 connectivity on Db2 for z/OS®, you might need to trace the C/C++ native driver code.

Procedure

To collect, format, and print the trace data for the C/C++ native driver code, follow these steps:

  1. Enable tracing of C/C++ native driver code by setting a value for the db2.jcc.t2zosTraceFile global configuration property.

    That value is the name of the file to which the IBM Data Server Driver for JDBC and SQLJ writes the trace data.

  2. Run the db2jcctrace command from the z/OS UNIX System Services command line.

    By default, the trace data goes to stdout. You can pipe the data to another file.

Example

Suppose that db2.jcc.t2zosTraceFile has this setting:
db2.jcc.t2zosTraceFile=/SYSTEM/tmp/jdbctraceNative
Execute this command to format all available trace data for the C/C++ native driver code, and send the output to stdout:
db2jcctrace format flow /SYSTEM/tmp/jdbctraceNative