Writing to trace destinations from monitor programs
A monitor program can write information to a specific trace destination by issuing a WRITE request for a specific IFCID.
About this task
A WRITE request is written
to a destination that is activated by a START TRACE command.
For example, you can write data to trace destinations for the following purposes:
- To extend accounting data. For example, a monitor program can collect batch file I/O counts, store them in a user-defined trace record, and process them along with standard Db2 accounting data.
- Include accounting data from QMF, IMS, or CICS®
- Permit CICS users to write the CICS accounting token and task number into the Db2 trace, assuming ACCOUNTREC in the DB2ENTRY RDO definition is neither UOW nor TASK .
Procedure
When writing information to trace destinations with the WRITE function, use the following approaches:
- Establish usage procedures and standards for the WRITE
function. Procedures ensure that the correct IFCIDs are active when the WRITE function is called. Standards determine the records and record formats that a monitor program sends to Db2.
- Place the record type and sub-type in the first fields
in the data record. You can use one IFCID to contain many different records, and this information can help you keep track of the data.