The Server Option trace functions  Using the tracing facility

Chapter 5: Tracing and Accounting

Trace log

Under IMS TM, the Gateway-Library trace facility writes header, data, and API tracing information to the IMS TM log. The same IMS TM log contains errors, tracing, and accounting, so each record needs to indicate the type of record it is. This information comes from TDCUSTOM.

Trace log layout

NoteThe structures of the trace log have the same layout in CICS as in IMS TM, although the log headers differ slightly.

Table 5-1: Trace log layout

Position

Field name

Field type

Field description

1-2

log-length

unsigned 2-byte integer

Record length. The total length of this record. (Maximum size is 640.)

3

log-type

unsigned byte

Type of record. There are two types of records for the trace log: trace and accounting.

The trace type can be an error record (TDS-ERR-REC; the value is 1) or a trace record (TDS-TRACE the value is 2).

The accounting log type value is 0.

4

log-direction

unsigned byte

Communication state: Shows whether the mainframe is in send or receive mode.

5-68

log-key

unsigned byte (max. length = 30)

unsigned byte (length=8)

unsigned byte (length = 24)

unsigned 2-byte integer

Structure containing the following:

user_id: The server login ID of the client, from the login packet.

trace_resid: Trace resource ID. In CICS, this keeps track of who is doing the tracing.

datetime: Date and time the SNA conversation or TCP/IP session started (TDACCEPT was issued).

uniquekey: Reserved for future use to ensure record has unique key.

69-82

log-txp-name

unsigned byte

Transaction name.

82-112

log-conn-id

unsigned byte

Connection ID. Name by which the connection is known to TRS.

113

log-connp

unsigned byte

Name of associated TDPROC structure.

114-117

log-error-rc

4-byte integer

Value returned to the RETURN-CODE parameter of a Server Option function (TDS-xxxx). See the Mainframe Connect Client Option and Server Option Messages and Codes for more information about return codes.

118-121

log-err-type

4-byte integer

Type of error detected.

122-123

log-err-reserved

2-byte integer

Reserved for future use.

124-125

log-data-length

2-byte integer

Length of the data to be logged.

126-637

log-data

unsigned byte

Data, including the packet header and the data. For TDWRTLOG, this is the message being written to the log.

637-640

log_filler

unsigned byte (length=36)

Filler, to fill out record to 640 bytes.





Copyright © 2005. Sybase Inc. All rights reserved. Using the tracing facility

View this book as PDF