Recording GTF trace data

The default destination for the performance trace classes is the z/OS® generalized trace facility (GTF). The z/OS operator must start GTF before you can send data to it.

Before you begin

Begin program-specific programming interface information.Ensure that no GTF member exists in SYS1.

About this task

When starting GTF, if you use the JOBNAMEP option to obtain only those trace records written for a specific job, trace records written for other agents are not written to the GTF data set. This means that a trace record that is written by a system agent that is processing for an allied agent is discarded if the JOBNAMEP option is used. For example, after a Db2 system agent performs an IDENTIFY request for an allied agent, an IFCID record is written. If the JOBNAMEP keyword is used to collect trace data for a specific job, however, the record for the IDENTIFY request is not written to GTF, even if the IDENTIFY request was performed for the job named on the JOBNAMEP keyword.

You can record Db2 trace data in GTF using a GTF event ID of X'FB9'.

Trace records longer than the GTF limit of 256 bytes are spanned by Db2.

Procedure

To start GTF:

Start v as indicated in the following table to ensure that offsets map correctly.
When starting GTF, specify TIME=YES, and then TRACE=USRP.
Table 1. Recording GTF trace data
You enter... System responds...
S GTF,,,(TIME=YES) AHL100A SPECIFY TRACE OPTIONS
TRACE=USRP AHL101A SPECIFY TRACE EVENT KEYWORDS --USR=
USR=(FB9) AHL102A CONTINUE TRACE DEFINITION OR REPLY END
END AHL125A RESPECIFY TRACE OPTIONS OR REPLY U
U AHL031I GTF INITIALIZATION COMPLETE
To make stopping GTF easier, you can name the GTF session when you start it. For example, you could specify S GTF.GTF,,,(TIME=YES)

Results

If a GTF member exists in SYS1.PARMLIB, the GTF trace option USR might not be in effect. When no other member exists in SYS1.PARMLIB, you are sure to have only the USR option activated, and no other options that might add unwanted data to the GTF trace.

End program-specific programming interface information.