Sample SQL procedures for tracing native SQL routines

A set of sample SQL procedures that trace native SQL routines can be installed with Db2.

The trace SQL procedures and supporting objects are:

DSN8.CREATE_DGTT
An SQL procedure that creates declared temporary table SESSION.DBMS_BUFFER, which contains the trace message buffer.
DSN8.DISABLE
An SQL procedure that disables the SQL routine trace message buffer.
DSN8.ENABLE
An SQL procedure that enables the SQL routine trace message buffer.
DSN8.GET_LINE
An SQL procedure that returns a single line from the SQL routine trace message buffer. The returned data does not include an end-of-line character sequence.
DSN8.GET_LINES
An SQL procedure that returns one or more lines from the SQL routine trace message buffer, and stores the lines in an array. The returned data does not include end-of-line character sequences.
DSN8.NEW_LINE
An SQL procedure that writes an end-of-line character sequence to the SQL routine trace message buffer.
DSN8.PUT
An SQL procedure that writes a line to the SQL routine trace message buffer, without an end-of-line character sequence.
DSN8.PUT_LINE
An SQL procedure that writes a line to the SQL routine trace message buffer, with an end-of-line character sequence.
DSN8.DBMS_ENABLE
A global variable that is used to test whether the SQL routine trace message buffer is enabled.
DSN8.GRPHICARR
A user-defined array type that can be used to define the array into which the output from DSN8.GET_LINES is written.

Run the provided installation job DSNTEJTR to create the SQL procedures for tracing native SQL routines. See the DSNTEJTR job prolog for instructions on how to customize the job for your site.