SET TRACELEVEL

Syntax

>>--EXEC SQL--SET TRACELEVEL--.-0-------.---END-EXEC--><
                              +-1-------+
                              +-2-------+
                              +-3-------+
                              +-4-------+
                              +-OFF-----+
                              +-DEFAULT-+
		

Parameters

0

Turns off the OpenESQL trace.

1

The following information is written to the trace file:

BEGIN traces main SQL directives
END indicates end of run
DIRECTIVES traces per compilation unit directives the first time a compilation unit is enountered at run time
PREPARE identifies the original source code when a statement is prepared
DISPOSE provides summary information for overall statement usage when a statement is removed from the prepared statement cache at disconnect time
FLUSH provides summary information for overall statement usage when a statement is flushed from the cache usually due to a cache overflow

2

The following information is written to the trace file in addition to the information written when you set the trace level to 1:

OPEN  
EXECUTE provides the number of rows selected, inserted, or updated
EXEC_IMMED EXECUTE provides the number of rows selected, inserted, or updated
ODBCCLOSE provides summary information for the current cursor use
STMT_CHANGED reports new concurrency and scroll option settings when the ODBC driver uses different settings than those requested by OpenESQL

3

The following information is written to the trace file in addition to the information written when you set the trace level to 2:

ODBCFETCH provides the number of rows fetched
COBOLFETCH provides the number of rows returned to the COBOL application

4

The following information is written to the trace file in addition to the information written when you set the trace level to 3:

  • EXEC_SQL_BEGIN
  • EXEC_SQL_END

OFF

Turns off the OpenESQL trace.

DEFAULT

Resets the trace setting to the value set by the SQL TRACELEVEL directive. If the TRACELEVEL directive was not used to compile a program, this is equivalent to setting this option to OFF.

Purpose

The SET TRACELEVEL statement enables you to dynamically set or change the reporting level of OpenESQL traces.

Example

EXEC SQL SET TRACELEVEL DEFAULT END-EXEC