DB2 accounting records are produced when a thread is terminated or sign-on occurs. This means that the period reported in the DB2 accounting record is the time between start or user sign-on (if reusing a thread previously used by another user) and thread termination or another sign-on. You can use the ACCOUNTREC(TXID) parameter in the DB2ENTRY or DB2CONN to cause a DB2 accounting record to be produced when the transaction ID changes, and when the thread terminates or another sign-on occurs.
For thread reuse, this means that many users are included in the same record, which can cause difficulties for both accounting and problem determination. The ACCOUNTREC(TASK) or ACCOUNTREC(UOW) settings in a DB2ENTRY or DB2CONN provide more granularity. This is because a record is produced for each user. It involves the passing of a token between CICS® and DB2, which is present in both CICS and DB2 traces. ACCOUNTREC(TASK) ensures that there is a minimum of one accounting record for each task. There can be more depending on thread reuse.
The CICS PA DB2 report only supports ACCOUNTREC(TASK) and ACCOUNTREC(UOW).
For more information about accounting and monitoring in a CICS DB2 environment, see the CICS DB2 Guide. For more information about setting up DB2 accounting, see the DB2 UDB for OS/390® and z/OS® Administration Guide.