For the purposes of debugging and diagnostics, SESAM/SQL supports the following trace functions:
the call trace
the message trace.
The call trace logs SQL DML and CALL DML statements of the application program and the associated SESAM/SQL responses.
The connection module of the application program and the ESQL runtime system log the statement immediately after their transfer from the application program and the responses immediately before their transfer to the application program.
The message trace logs SESAM/SQL messages exchanged between the task of an application program and the task of the SESAM/SQL DBH. In addition to applicationprogram statements and the associated SESAM/SQL replies, the message trace also receives internal SESAM/SQL administration information.
The application program's connection module logs the statement message just before it is sent to the DBH and the reply message shortly after it is received.
The communication component of the DBH logs the messages of all application programs that communicate with the DBH. It logs the statement message immediately after its receipt and the reply message immediately before it is sent.
You can activate the trace as required. There are a number of options:
TRACE statement as a connection-module parameter or UTM start parameter
TRACE statement at the CALL DML program interface
DBH administration statement
SESDCN administration statement
The activated traces are logged to SYSOUT and/or SYSLST.
TRACE statement as a connection-module parameter
You can cause the call trace and/or message trace to begin logging as soon as a TIAM, DCAM or UTM application program starts. To do this, you must enter the following TRACE statement as a connection-module parameter in the configuration file of the application program:
TRACE,TYPE ={CALL/MSG/({CALL/MSG},...)}
[,OUTPUT={SYSOUT/SYSLST/({SYSOUT/SYSLST},...)}]
Meanings of the parameters:
| Selects the type of logging |
| Selects an output medium |
In some cases, logging is activated with a delay and the first statements of the program run are not logged. This happens, for example, when statements lead to errors before the configuration file can be evaluated, or when SQL statements issued at the beginning of the program run are processed completely by the ESQL runtime system.
TRACE statement at the CALL DML program interface
In TIAM and DCAM mode, you can enter the trace statement at the CALL DML program interface to turn call-trace and/or message-trace logging on or off during the session (see the “ CALL-DM Applications” manual). In UTM mode, the TRACE statement is not permitted at the CALL DML program interface.
DBH administration statement
You can use the SET-DBH-MSG-TRACE administration statement (see "SET-DBH-MSG-TRACE") to turn the message trace on or off during the DBH session. This administration statement also allows you to select an output file for the log information.
SESDCN administration statement
During an SESDCN session you can turn the message trace and call trace on or off for specific users. Two administration statements are available for this:
The SET-USER-MSG-TRACE statement activates the message trace (see "SET-USER-MSG-TRACE").
The SET-USER-CALL-TRACE statement activates the call trace (see "SET-USER-CALL-TRACE").
Both these statements also let you select an output file for the log information.