Trace job

The Trace Job (TRCJOB) command is the older of the two tracing tools. As the trace records are generated, the records are stored in an internal trace storage area. When the trace is ended, the trace records can be written to a spooled printer file (QPSRVTRC) or directed to a database output file.

A sample trace scenario is as follows:

TRCJOB SET(*ON) TRCTYPE(*ALL) MAXSTG(2000)
       TRCFULL(*WRAP) EXITPGM($SCFTRC)
CALL QCMD
TRCJOB SET(*OFF) OUTPUT(*PRINT)
WRKOUTQ output-queue-name

You will see a spooled file with a name of QPSRVTRC. The spooled file contains your trace.

Related concepts
Interpret trace job and FFDC data
Related information
Trace Job (TRCJOB) command