Setting trace destinations and tracing status

You can set the system tracing status by using the appropriate system initialization parameters, or by using the CETR transaction or the SET TRACETYPE command when CICS® is running. You can use the CETR transaction and SET TRACETYPE command to make changes in response to contingencies as they arise.

About this task

There are four possible destinations for trace entries in CICS:
  • The internal trace table
  • The auxiliary trace data sets
  • The MVS™ generalized trace facility (GTF) data sets
  • The JVM server trace file in z/OS® Unix System Services
You can select any combination of tracing, based on these factors:
  • The characteristics of the various types of CICS tracing
  • The amount of trace data that you need to capture
  • Whether you want to integrate CICS tracing with tracing done by other programs
For information about the different trace destinations, see Trace destinations.

Procedure

  • To set up the tracing status at system initialization, use the following system initialization parameters:
    • AUXTR, to specify whether auxiliary trace is to be on or off at CICS startup.
    • AUXTRSW, to specify whether or not automatic switching takes place for auxiliary trace data sets when they are full.
    • GTFTR, to specify whether CICS is to use GTF as a destination for CICS trace data.
    • INTTR, to specify whether internal tracing is to be on or off at CICS startup.
    • SYSTR, to set the main system trace flag on or off at CICS startup.
    • TRTABSZ, to specify the size of the internal trace table.
    • TRTRANSZ, to specify the size of the transaction dump trace table, which is the copy of the internal trace table that CICS makes in the event of a transaction dump.
    • USERTR, to set the main user trace flag on or off at CICS startup. This flag must be on if your applications make user trace calls.
  • To set the tracing status while CICS is running, use the CETR transaction or the CEMT transaction:
    1. If you want to use standard tracing or capture user trace entries from applications, ensure that the main system trace flag is set to ON.
      If it is OFF, no standard tracing is done at all, even though standard tracing might be specified for some tasks. Also, any trace call requests in your programs are ignored. You can see the role of the main system trace flag in Logic used to determine if a trace call is to be made from a trace point.
    2. If you want to direct regular tracing explicitly to the internal trace table, set internal tracing status to STARTED.
      The internal trace table is used as a buffer for the other trace destinations, so it always contains the most recent trace entry if at least one trace destination is STARTED. It is also used as the destination for exception trace entries.
    3. To use GTF tracing, set the GTF trace status to STARTED. Ensure that the GTF trace data set is defined to MVS.
      Be aware that no error condition is reported if the CICS GTF status is started but GTF tracing has not been started under MVS. If this happens, the trace entries are not written. To write trace entries, MVS GTF trace must be started with the TRACE=USR option before CICS GTF trace is started.
    4. To start writing entries to the auxiliary trace data sets, set the auxiliary trace status to STARTED.
      If you have two auxiliary trace data sets, you can use the auxiliary switch to specify the action CICS takes when one data set is full. For an explanation of the actions, see Auxiliary trace data sets.
    5. To start writing JVM server tracing, use the CETR transaction to trace the SJ and AP components. JVM servers do not use auxiliary or GTF tracing. Instead, a small amount of trace is written to the internal trace table and the rest of the trace is written out to a file in zFS that is unique for the JVM server. For more information, see Activating and managing tracing for JVM servers.
    6. To stop internal tracing, GTF tracing, or auxiliary tracing, set their status to STOPPED.
      For auxiliary tracing, you can also set a status of PAUSED. With this status, CICS stops writing entries to the auxiliary trace data set, but leaves the data set open.
  • Alternatively, to set the tracing status while CICS is running, use the SET TRACETYPE command.
  • To change the size of the internal trace table while CICS is running, use the CETR transaction.
    When you change the size of the internal trace table, you lose all of the trace data that was present in the table at the time of the change. If you want to keep the data and change the size of the table, take a system dump before you make the change.