Prepare for a specific component trace to trace data sets

The system programmer performs the following tasks:

1. Determine the dispatching priority required for the external writer started task, the server address space for the component's trace:

While component trace runs under the master scheduler address space, you need to verify that the priority of the external writer is at least equal to, and preferably greater than the priority of the component being traced. For example, if you are tracing COMP(SYSXES) for JOBNAME(IRLMA), the dispatching priority of the external writer should be equal to or greater than that assigned to IRLMA. See z/OS MVS Initialization and Tuning Guide for more information on setting priorities.

2. Select How the Operator Is to Request the Trace:

For most component traces, the request can be made by: If you do not use a parmlib member, tell the operator the options.

3. Create Source JCL for the External Writer:

Create source JCL to invoke an external writer, which will send the component trace output to one or more trace data sets. Add a procedure to the SYS1.PROCLIB system library or a job as a member of the data set in the IEFJOBS or IEFPDSI concatenation.

An external writer is not specific for a component but can be used by any application. So you can use the same source JCL again for other tracing later, if needed.

Concurrent traces for different components must use separate source JCL to place their traces in separate data sets.

Because the writer source JCL specifies data sets, use a different set of source JCL for each system in a sysplex. Several systems cannot share the same data set; attempting to share the same data set will lead to contention problems. If your sysplex uses a common SYS1.PROCLIB, you need to specify a unique writer procedure for each system or use a unique job as the source JCL, when tracing the same component on several systems.

The procedure shown in Figure 1 places trace data on two DASD data sets. The procedure is placed in member WTRD2 of SYS1.PROCLIB.
Figure 1. Example: Cataloged Procedure for an External Writer
//WTDASD2  PROC
//IEFPROC  EXEC PGM=ITTTRCWR,REGION=32M
//TRCOUT01 DD  DSNAME=SYS1.CTRACE1,VOL=SER=TRACE6,UNIT=DASD,
//         SPACE=(CYL,10),DISP=(NEW,KEEP),DSORG=PS
//TRCOUT02 DD  DSNAME=SYS1.CTRACE2,VOL=SER=TRACE7,UNIT=DASD,
//         SPACE=(CYL,10),DISP=(NEW,KEEP),DSORG=PS
Rules for the Source JCL for an External Writer:
z/OS® V1R7 supports the following types of external media:

For the details of the external data sets guidelines, see Guidelines for defining GTF trace output data sets in a cataloged procedure.

Wrapping DASD Trace Data Sets: If the WTRSTART parameter on the CTncccxx parmlib member or TRACE CT operator command specifies:
Note: Wrapping is not supported for Extended Format Sequential data sets, which are treated as NOWRAP even if WRAP is specified.

Tape Data Sets: CTRACE writes an end-of-file record. The tape is rewound and unloaded, then a new volume is mounted on the tape unit. If CTRACE has only one tape data set and only one unit for the data set, CTRACE does not write trace records while the tape is unavailable, thus losing trace data. CTRACE can write to multiple tape units in the way that multiple TRCOUTxx DD statements can specify tape data sets. When CTRACE fills one data set, it changes to the next data set.

Note: GTF and CTRACE support placement of NOWRAP traces in cylinder-managed space. WRAP traces placed in VSAM linear data sets can reside in cylinder-managed space too. WRAP traces in non-VSAM data sets cannot be placed in large format data sets, extended format data sets, or cylinder-managed space.
Multiple Trace Data Sets: Use multiple data sets to capture all the trace records, even during spikes of activity. For a SYSRSM trace, which typically produces large numbers of trace records, use multiple data sets to keep from losing records. Multiple trace data sets using different DASD devices can improve performance. To view the trace records in chronological sequence, the system programmer can:
The system places component trace records into each trace data set in sequence. For example, for three data sets, the system places:
Lost Trace Data: Ctrace will give an indication in the next successfully written record of any trace data that did not reach the output medium. If no further records are written, the following message is displayed when the external writer is stopped:
ITT120I SOME CTRACE DATA HAS BEEN LOST.
LAST nnn BUFFERS NOT WRITTEN.