Contents of the IMS attachment facility trace table
When an application program makes a call to Db2 (via an SQL request), resources can be allocated (plan ID) and the call can be processed.
The IMS attachment facility traces events, called control status points, such as resources being allocated, in the WALTAREA; the normal application call path is traced in the WAU trace table.
The following sections describe the format and contents of individual trace entries and indicate when individual fields within a trace entry are updated.
Sequence of IMS Trace Activities
- Control status point A
- When IMS invokes the IMS attachment facility, the 32-byte trace entry is blanked out and replaced by an exit ID and unique ascending sequence number.
- Control status point B
- Just before the IMS attachment facility calls Db2, the call function fields are updated.
- Control status point C
- When Db2 returns control to the IMS attachment facility, the status fields are updated.
- Control status point D
- If the attachment facility calls one or more subroutines, the subroutine information is traced after the subroutine completes.
- Control status point E
- The return code is updated when the IMS attachment facility returns control to IMS.
| Value and length | Trace ID | Sequence number | Call function | Call Status | Subroutines | RC |
|---|---|---|---|---|---|---|
| Filled in at CSP | A | A | B | C | D | E |
| Length in bytes | 4 | 2 | 6 | 6 | 12 | 2 |
The control status points (CSP) of A, B, C, D, and E are defined as follows:
Trace
identification, sequence number at CSP A: Each entry in the trace
table begins with an eye-catcher
to help identify the various
trace identification field values in the trace table.
- For the WAL trace, the trace identification field can be set to
these events:
- ABRT
- Abort continue (rollback) a unit of recovery.
- CMD0
- Process a Db2 command.
- COMC
- Commit continue (phase 2) a unit of recovery.
- CTHD
- Create a thread to Db2.
- ECHO
- Determine if Db2 is operational.
- ID00
- Identify: Initialize a connection from the IMS application to Db2.
- INIT
- Initialize the IMS attachment facility work areas.
- PREP
- Prepare to commit (phase 1) a unit of recovery.
- RI00
- Resolve indoubt work units between IMS and Db2.
- SIGN
- Sign on a new user to Db2.
- SOFF
- Sign off a user to Db2.
- SUBT
- Handle subsystem termination of Db2 or IMS.
- TRMI
- Terminate Identify: Terminate the connection to Db2.
- TRMT
- Terminate the thread between Db2 and IMS.
- For the WAU trace, the trace identification field can be set to
these events:
- NORC
- Normal call to process a SQL request.
- SNO0
- System not operational to handle exceptional conditions.
Sequence number:
The sequence number following the trace identifier reflects the order in which the trace entry was recorded in relation to the other trace entries. This sequence number can then be used to determine the correct sequence of events when the trace table wraps.
- Call function at CSP B
- Indicates that a request to Db2 has been made. This code is used internally; note only whether the value is blank or nonblank.
- Call status at CSP C
- Indicates that the request to Db2 has been completed and that control has returned to the IMS attachment facility. This Db2 return code and reason code is returned to the IMS Attach from Db2 for upon completion of the event.
- Subroutine at CSP D
- Called identification (traced after call to routine). This information is generally not applicable to diagnosing problems.
- Return code at CSP E
- The IMS attachment facility return code from the exit.
The character string TRCx
precedes the first
trace entry in each of the trace tables (WAL and WAU). Refer to The
following table for information about the combinations of field values
in a trace entry and about what these might indicate.
| Control Status Points | Remarks | ||||
|---|---|---|---|---|---|
| A | B | C | D | E | |
| n | b | b | n/a | b | The call has entered the IMS attachment facility. |
| n | n | b | n/a | b | The call is in Db2. |
| n | n | n | n/a | b | The call has returned from Db2 and is in the IMS attachment facility or in a subroutine. |
| n | n/a | n/a | n/a | n |
|
- n
- Represents nonblank fields.
- b
- Represents blank fields (that is, X'40').
- n/a
- indicates that this field contains information that is not applicable.