Transaction tracking with Cross Component Trace (XCT)

You can use Cross Component Trace (XCT) to track individual requests as they flow between WebSphere® Application Server, CICS® Transaction Gateway and CICS, assisting both problem diagnosis and system planning and configuration.

The XCT facility is available when using IPIC connections and WebSphere Application Server V8.5 or later, when High Performance Extensible Logging (HPEL) is enabled. As a request flows through the system, the related XCT information is in the WebSphere HPEL log, CICS TG request monitoring exit data and CICS task association data, which you can view in a variety of ways.

XCT contexts

XCT contexts are hierarchical and Begin and End demarcate component boundaries. A thread of execution can have up to three XCT contexts at any one time:
  • Root – the initial context (Request ID) of the component at the point of entry.
  • Parent – the context of the calling component.
  • Current – the context of the current component.

Diagram showing heirarchy of XCT contexts and component boundaries
In the diagram above, A refers to the context assigned to the incoming request, B to the context of the Channel Framework, and C to the JCA CICS.

XCT data in WebSphere

XCT context data is written to the HPEL log. For the ECI resource adapter, the log is annotated with the target CICS server, the CICS program name and, on exit, the CICS return code.

An example of XCT context data written to the HPEL repository viewed through the WebSphere Application Server Log Viewer:

Screen image showing XCT context data in in the HPEL log.

The XCT context data can also be seen in the WebSphere Application Server log file:
[9/3/12 12:45:10:016 GMT] 00000046  I UOW= source=com.ibm.websphere.XCT class= method= org=null prod=null component=null 
          thread=[WebSphere WLM Dispatch Thread t=007c40b8] requestID=[BKwWqX+HPuK-AAAAAAAAAAG]
          BEGIN BKwWqz2kOGV-AAAAAAAAAAE BKwWqz2kOGV-AAAAAAAAAAD ECIRA(Server(24TGNSIP) Program(EC01))
[9/3/12 12:45:31:106 GMT] 00000046  I UOW= source=com.ibm.websphere.XCT class= method= org=null prod=null component=null 
          thread=[WebSphere WLM Dispatch Thread t=007c40b8] requestID=[BKwWqX+HPuK-AAAAAAAAAAG]
          END   BKwWqz2kOGV-AAAAAAAAAAE BKwWqz2kOGV-AAAAAAAAAAD ECIRA(Server(24TGNSIP) Program(EC01) RC(ECI_NO_ERROR))

Additional information can be viewed using the WebSphere Application Server Cross Component Trace.

For more information about configuring Cross Component Trace, see the WebSphere Application Server V8.5 information center"

XCT data in CICS TG

Within the Gateway daemon, the XCT context data is available in the request monitoring exits. At all request monitoring exit points, three XCT request identifiers are available:
  • XctRoot, the initial context of the component at the point of entry.
  • XctParent, the context of the calling component.
  • XctCurrent, the context of the current component, CICS TG.
The XCT data in the Gateway daemon is available for all CICS server protocols but it is only when using IPIC that the context data is propagated to CICS in the origin data. The root and current XCT contexts are available in the origin data at the RequestDetails and ResponseExit exit points.
The following example shows the XCT and origin data entries in the request monitoring log when using the supplied sample request monitor BasicMonitor:
 [00000000001]: com.ibm.ctg.samples.requestexit.BasicMonitor:eventFired called with event = RequestEntry
   : : : : : : 
 [00000000001]: XctRoot = BKwWqX+HPuK-AAAAAAAAAAG
 [00000000001]: XctParent = BKwWqz2kOGV-AAAAAAAAAAD
 [00000000001]: XctCurrent = BKwWqz2kOGV-AAAAAAAAAAE
  
 [00000000001]: com.ibm.ctg.samples.requestexit.BasicMonitor:eventFired called with event = RequestDetails
  : : : : : : 
 [00000000001]: OriginData - Transaction Group ID = 1A10C2C1 E8D3C9E2 E22EC7C1 E3C5E6C1 E8F1CA1D BCBD6459 8200 
                           - User Correlator = XCT     BKwWqX+HPuK-AAAAAAAAAAG BKwWqz2kOGV-AAAAAAAAAAE
  : : : : : : 
 [00000000001]: XctRoot = BKwWqX+HPuK-AAAAAAAAAAG
 [00000000001]: XctParent = BKwWqz2kOGV-AAAAAAAAAAD
 [00000000001]: XctCurrent = BKwWqz2kOGV-AAAAAAAAAAE
  
 [00000000001]: com.ibm.ctg.samples.requestexit.BasicMonitor:eventFired called with event = ResponseExit
  : : : : : : 
 [00000000001]: OriginData - Transaction Group ID = 1A10C2C1 E8D3C9E2 E22EC7C1 E3C5E6C1 E8F1CA1D BCBD6459 8200 
                           - User Correlator = XCT     BKwWqX+HPuK-AAAAAAAAAAG BKwWqz2kOGV-AAAAAAAAAAE
  : : : : : : 
 [00000000001]: XctRoot = BKwWqX+HPuK-AAAAAAAAAAG
 [00000000001]: XctParent = BKwWqz2kOGV-AAAAAAAAAAD
 [00000000001]: XctCurrent = BKwWqz2kOGV-AAAAAAAAAAE
For more information about when the XCT request identifiers are available, see Data available by FlowType and RequestEvent Data available by FlowType and RequestEvent

XCT data in CICS

For IPIC only, the user correlation data containing the root and current XCT contexts is sent from CICS TG to CICS as part of the origin data. In addition to obtaining the user correlation data through the CICS API, the user correlation data can be viewed in the task's association data, using the command CEMT INQUIRE ASSOCIATION(taskid), or in the Task Associations view in CICS Explorer®, and is recorded to SMF in type 110, sub-type 01 records.

The following screenshot shows association data displayed using the CICS API command INQUIRE ASSOCIATION(taskid):

Screenshot showing association data displayed using the CICS API command INQUIRE ASSOCIATION(taskid)

The CICS Explorer can also be used to display the user correlation data, for example:

Screen image showing the user correlation data in CICS Explorer


Reference Reference

Feedback


Timestamp icon Last updated: Tuesday, 19 November 2013


https://ut-ilnx-r4.hursley.ibm.com/tgzos_latest/help/topic/com.ibm.cics.tg.zos.doc//ctgzos/tran_tracking_xct.html