IBM Support

STRTRC - Starting a Job Trace Job

Troubleshooting


Problem

This document describes how to start a job trace, how to end a job trace, and how to print the trace. It also shows how to remove the trace database members from the system.

Resolving The Problem

Sometimes a problem cannot be tracked to a specific program. In these cases, the Start Trace (STRTRC) command can be used for tracing module flow, IBM i data acquisition and CL commands executed.

These tools should be used when the problem analysis procedures do not supply sufficient information about the problem. For distributed database applications, these commands are also useful for capturing distributed database requests and response data streams.

The STRTRC command allows tracing across multiple jobs and shows in-depth details about the module flow. A trace can also monitor for a specific message ID and end when the job encounters the message. Starting at release V5R4M0. the trace information can live across an IPL.

Note: To use this command, you must have service (*SERVICE) special authority.

STRTRC – used to specify the target job(s) being traced, the size and type of trace, and the action to take if the trace fills.

STRTRC Command.  Fill Session ID and Job to Trace
The Trace session ID will be called MyTrace and will also be used to end and print the trace. This sample will trace all jobs named DSP01 with user ID QSECOFR. It is also important to increase the Maximum Storage Use because the default value may not be large enough for most problems.

Press F9 to look at additional parameters:

STRTRC Additional Parameters.  Fill if necesary.
If you want the trace to restart after and IPL, make sure that you select the option under the additional parameters. If you would like the trace to end automatically when we find a message ID, add it to the Message Identifier parameter. If the message is encountered on the trace, it will end automatically. Watched message queue allows to specify the source of the message being watched.

ENDTRC – used to turn off and it can also be used to print the trace

ENDTRC Command.  Fill Session ID Name to end the trace
Specify the name of the trace to end. Do not select the option to print the trace now. There is no need to use this command if the trace is ended automatically when watching for a specific Message ID.

PRTTRC – used to print the trace, if not specified on ENDTRC.

PRTTRC Command. Fill option to Delete Trace after is printed.
Selecting Delete Trace will clean up the trace member after if print the trace. Option to print will create a spooled file for your current job.

Note: TRCJOB – This is the obsolete trace command. It was event-based and required a STRSRVJOB command to be issued. On current releases, the TRCJOB command will issue a STRTRC. If someone asks for a TRCJOB, they may actually mean STRTRC.

[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m3p000000GoLkAAK","label":"Job and Work Management-\u003EManaging jobs"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions"}]

Historical Number

552825917

Document Information

Modified date:
04 October 2024

UID

nas8N1012460