Specifications for the diagnostic trace file

The diagnostic trace data can be written to a z/OS® sequential data set or to a z/OS UNIX environment HFS file.

A z/OS data set must be preallocated with the following data set attributes:
  • Sequential data set organization
  • Fixed-block 80 record format

When you execute an ODBC application in the z/OS UNIX environment and activate the diagnostic trace using the DIAGTRACE keyword in the initialization file, Db2 writes the diagnostic data to a dynamically allocated file, DD:DSNAOTRC. This file is located in the current working directory of the application if the DSNAOTRC DD statement is not available to the ODBC application. You can format DD:DSNAOTRC by using the DSNAOTRC, DSNAOTRX, or DSNAO64T trace formatting programs.

Example: The following JCL examples use a DSNAOTRC DD JCL statement to specify the diagnostic trace file.

  • Write to preallocated sequential data set USER01.DIAGTRC.
    //DSNAOTRC DD      DISP=SHR,DSN=USER01.DIAGTRC 
  • Write to the preallocated z/OS UNIX environment HFS file DIAGTRC in the directory /usr/db2.
    //DSNAOTRC      DD      PATH='/usr/db2/DIAGTRC'
  • Allocate the z/OS UNIX environment HFS file DIAGTRC in the directory /usr/db2 specifying permission for the file owner to read from (SIRUSR) and write to (SIWUSR) the trace file.
    //DSNAOTRC        DD   PATH='/usr/db2/DIAGTRC',
                        PATHOPTS=(ORDWR,OCREAT,OTRUNC),
                        PATHMODE=(SIRUSR,SIWUSR)