This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.
MainView for DB2
Why does DB2 correlation ID show CICS transaction ID that does not match the transaction id of the running CICS transaction?
This is due to signon reuse of a thread.
The following is documented in the CICS Transaction server manual:
DB2 thread identification
A thread executing in DB2® on behalf of a CICS® transaction is identified by its correlation ID, which is set by the CICS DB2 Attachment Facility.
DB2 allows up to 12 bytes to be used for the correlation ID.
The format 12 byte correlation ID is made up as eeeettttnnnn where eeee is either COMD, POOL or ENTR indicating whether it is a command, pool or DB2ENTRY thread; tttt is the transid, and nnnn is a unique number.
Note: A correlation ID passed to DB2 can be changed only by the CICS Attachment Facility issuing a signon to DB2. If signon reuse occurs by a thread using a primary authorization ID which remains constant across multiple transactions (for example, by using AUTHID(name)) only one signon will occur.
In this instance the tttt in the correlation ID does not match the running transaction ID. It is the ID of the transaction for which the initial signon occurred.
The ACCOUNTREC parameter determines when an DB2 accounting record is written. For additional information refer to CICS Transaction Server manual section > Controlling the relationship between DB2 accounting records and CICS performance class records.