Navigating between CICS task history and Db2 thread history

To evaluate the performance of a CICS transaction that uses Db2, you may need to examine CICS Task History and Db2 thread history. To make this easier, you can navigate directly between the Task History workspace in OMEGAMON AI for CICS and the Db2 Thread History in IBM OMEGAMON for Db2 on z/OS.

Db2 threads and CICS tasks

CICS transactions can execute very quickly. Looking at Task History may be the only way to evaluate the performance of a transaction. CICS Task History often indicates that a transaction spent the bulk of its time in Db2. Or, by looking at Db2 Thread History in IBM OMEGAMON for Db2 on z/OS, you can see that a task originated in a CICS Region.

In both cases, it was often difficult to determine the exact instance of the thread in Db2 or the Task in CICS. But with OMEGAMON AI for CICS version 5.6.0 and IBM OMEGAMON for Db2 on z/OS version 5.5.0, you can now easily correlate between the detailed history collected by the two products. The OMEGAMON AI for CICS user can identify the thread in question and see all the attributes collected for it. The IBM OMEGAMON for Db2 on z/OS user can now rapidly determine details of the CICS task and, using the related tab, identify other CICS tasks which make up that unit-of-work.

The navigation works both ways:
  • From the OMEGAMON AI for CICS Task History workspace, you can click directly to Db2 Thread History.
  • From the IBM OMEGAMON for Db2 on z/OS Db2 Thread History workspace, you can click directly to CICS Task History.

Finding a Db2 thread from CICS Task History

To finding the Db2 thread generated by a CICS task, follow these steps:
  1. From the All Active CICSplexes workspace, choose the CICSplex you want to examine, by typing S next to the CICSplex.
  2. Enter O next to a CICS Region. This brings up the CICSplex Task History Summary workspace.
  3. Enter I next to the task you want to investigate. This brings up the I/O tab in the Task History Detail workspace.

At the bottom of the workspace, the DB2 Times subpanel allows you to navigate to the Db2 Thread History workspace.

                                DB2 Times
Plan Name................. CICSDEMO | Connection ID............. JSKCICS1
Correlation ID............ POOLDBMO | Auth ID...................   TSS787
Elapsed Time.............. 2.383145 | In-DB2 Elapsed............ .595096s
Total Class 3 Time........ .592262s | Total Class 3 Events......       96
The information in this subpanel comes from IBM OMEGAMON for Db2 on z/OS. The fields with highlighted titles are "Zoom Linkage" fields; you can click on one of those to go directly to the Db2 Thread History workspace, showing the Db2 thread history for this CICS transaction.

Clicking on Plan Name, Elapsed Time, or In-Db2 Elapsed will bring you to the Db2 Accounting tab (“Acct”) in the Db2 Thread History Detail Accounting workspace. Clicking on Total Class 3 wait time or Total Class 3 events brings you to the Db2 Class 3 Wait Time tab (“Class 3”) in the Db2 Thread History Detail Accounting workspace.

 KDPHACCT      DB2 Thread History Detail Accounting         DB2 ID   : OC1B     
                                                                                
    Acct  |  Class3  |  BP  |  GBP  |  LWat                                         
                                                                                
                             Thread Information                            
                                                                                
   Time:Start=2023-02-10 07.01.21.422863 End=2023-02-10 07.01.21.439892         
   Plan Name.................  DSNUTIL   Connection ID.............  UTILITY    
   Correlation ID............ PRDWOC1B   Auth ID...................   SUBJCL    
   Connection Type...........  Utility   DB2 Subsystem.............     OC1B    
   MVS System ID.............      SB3   Logical Unit of work ID... ROCKNET1    
   Commits...................       16   Aborts....................        0    
   Parallel Agents...........        0   Autonomous Count..........        0    
   Parallel Tasks/Autonomous         0   Term Status...............  DEALLOC    
                                                                                
                           CICS Task History Detail
   Transaction ID............      DEMO    CICS Region Name.......... CTSMT99C
   Task Number...............     00100    CPU Time.................. .0068485
   Response Time.............  .618106s    User ID...................   TS1234
   Program ID................  CICSDEMO    Storage HWM...............     3360
   End Time..................  19:09:47    Start Time................ 10:09:47
   End Date..................  10/03/22    Start Date................ 10/03/22
   File Requests.............         2    ABEND Code................

                              Class 1/2 Times                              
                                                                                
   Elapsed Time.............. .017029s   In-DB2 Elapsed............ .016778s    
   Non Nested Class 1........ .017029s   In-DB2 Non-Nested Class 2/ .016778s    
   Stored Proc Class 1....... 0.00000s   In-DB2 SP Class 2/3....... 0.00000s    

Finding a CICS Task from Db2 Thread History

To find a CICS Task from Db2 Thread History, follow these steps:
  1. From the initial All Active DB2 Subsystems tab when you enter IBM OMEGAMON for Db2 on z/OS, select a subsystem by entering R next to the Db2 ID.
  2. Enter the thread history filters you want to use, starting with Thread History Timespan Selection. The Thread History Summary workspace appears.
  3. Select a CICS thread; you can do this by entering S next to the Stored Date in the left column. The Db2 Thread History Detail Accounting workspace appears.
 KDPHACCT      DB2 Thread History Detail Accounting         DB2 ID   : OC1B     
                                                                                
    Acct    Class3    BP    GBP    LWat                                         
                                                                                
                             Thread Information                            
                                                                                
   Time:Start=2023-02-10 07.01.21.412190 End=2023-02-10 07.01.21.422708         
   Plan Name.................  DSNUTIL   Connection ID.............  UTILITY    
   Correlation ID............ PRDWOC1B   Auth ID...................   SUBJCL    
   Connection Type...........  Utility   DB2 Subsystem.............     OC1B    
   MVS System ID.............      SB3   Logical Unit of work ID... ROCKNET1    
   Commits...................       13   Aborts....................        0    
   Parallel Agents...........        0   Autonomous Count..........        0    
   Parallel Tasks/Autonomous         0   Term Status...............  DEALLOC    

                           CICS Task History Detail
   Transaction ID............      DEMO    CICS Region Name.......... CTSMT99C
   Task Number...............     00100    CPU Time.................. .0068485
   Response Time.............  .618106s    User ID...................   TS1234
   Program ID................  CICSDEMO    Storage HWM...............     3360
   End Time..................  19:09:47    Start Time................ 10:09:47
   End Date..................  10/03/22    Start Date................ 10/03/22
   File Requests.............         2    ABEND Code................
                                                                                
                              Class 1/2 Times                             
                                                                                
   Elapsed Time.............. .010517s   In-DB2 Elapsed............ .010361s    
   Non Nested Class 1........ .010517s   In-DB2 Non-Nested Class 2/ .010361s    
   Stored Proc Class 1....... 0.00000s   In-DB2 SP Class 2/3....... 0.00000s    

The CICS Task History Detail subpanel displays information from OMEGAMON AI for CICS Task History. The highlighted fields are "Zoom Linkage" fields. Clicking on Transaction ID links to the Task History Detail workspace in OMEGAMON AI for CICS (see below).

KCPTASHI               Task History Detail                 Region   : CICD6102
                                                                              
   Details  | Statistics  | Storage  | Timings  | I/O  | Programs  | Related  
                                                                              
                          Transaction I/O Waits                          
                                                                              
  TC I/O Wait Time.......... 3.47096s   Transient Data I/O Wait... 0.00000s   
  File I/O Wait Time........ 0.00000s   JC I/O Wait Time.......... 0.00000s   
  TC I/O Wait Time.......... 3.47096s   MRO Wait Time............. 0.00000s   
  LU 6.1 Terminal I/O Wait.. 0.00000s   LU 6.2 Terminal I/O Wait.. 0.00000s   
  RMI Suspend Time.......... 0.00000s   RLS File I/O Wait......... 0.00000s   
  Shared TS I/O Wait Time... 0.00000s   Socket I/O Wait Time...... 0.00000s   
  SOCKET Outbound Wait...... 0.00000s   SOCKET receive wait....... 0.00000s   
  DB2 Connection Wait Time.. 0.00000s   DB2 Readyq Wait Time...... 0.00000s   
  DB2 Wait Time.............      n/a   IMS Wait Time............. 0.00000s   

                           Task DB2 Statistics
  Open cursors..............        0   Open cursor time.......... 0.00000s
  Close cursors.............        0   Clocse cursor time........ 0.00000s
  Fetches...................        0   Fetch time................ 0.00000s
  Selects...................        0   Select time............... 0.00000s
  Inserts...................        0   Insert time............... 0.00000s
  Updates...................        1   Update time............... .003120s
  Deletes...................        0   Delete time............... 0.00000s
  Prepares..................        0   Prepare time.............. 0.00000s
  Describes.................        0   Describe time............. 0.00000s
  Executes..................        0   Execute time.............. 0.00000s
  Exec immediates...........        0   Exec immediate time....... 0.00000s
  Miscellaneous calls.......        1   Miscellaneous call time... .000928s
  Total requests............        2   Elapsed time.............. .004048s
  DB2Entry Name............. CICSDEMO   DB2Plan Name               CICSDEMO
  DB2Tran Name..............  DFHDBMO 

                                  DB2 Times
  Plan Name................. CICSDEMO   Connection ID............. JSKCICS1
  Correlation ID............ POOLDBMO   Auth ID...................   TS1234
  Elapsed Time.............. 1.81026s   In-DB2 Elapsed............ .003469s

Clicking on CICS Region Name from the DB2 Thread History Detail Accounting workspace displays a pop-up with several possible actions that can be taken for that CICS Region.

Configuration note

In the CICS DB2CONN or DB2ENTRY definitions, ACCOUNTREC must be set to UOW or TASK to create the correct LUWIDs that are common to Db2 and CICS. See the CICS Transaction Server for z/OS Db2 Guide for more information about how the CICS/Db2 connections are defined. This configuration creates a field in the Db2 IFCID that allows identification of the CICS Transaction that created the Db2 Thread. This option is required in order for the feature to work properly:

Db2 link configuration settings