Start Job Trace (STRJOBTRC)

The Start Job Trace (STRJOBTRC) command starts the job tracing function to collect performance statistics for the specified job. It issues the following command:

STRTRC MAXSTG(maxstg) TRCFULL(*STOPTRC)

The MAXSTG value used is either the STRJOBTRC default or a specified value.

Once job tracing is started, a trace record is generated for every external (program) call and return, exception, message, and work station wait in the job. At least two, and usually more, trace records are generated for every I/O statement (open, close, read, write) in a high-level language program.

After the target programs have been run, the End Job Trace (ENDJOBTRC) command is used to turn tracing off, record the collected information in a database file, and optionally produce reports used to analyze the data. The Print Job Trace (PRTJOBTRC) command may also be used to print the same report at any time thereafter. Alternatively, specifying *DLT for the Data option (DTAOPT) parameter of the End Trace (ENDTRC) command may be used to stop the job trace (turn it off without recording any collected data).

Parameters

Keyword Description Choices Notes
MAXSTG Maximum storage 1-4000000, 10000 Optional, Positional 1
JOB Job name Single values: *
Other values: Qualified job name
Optional
Qualifier 1: Job name Name
Qualifier 2: User Name
Qualifier 3: Number 000000-999999
THDID Thread ID to include Values (up to 20 repetitions): Hexadecimal value, *ALL Optional

Maximum storage (MAXSTG)

Specifies the maximum amount of storage to allocate to the internal buffer in which every trace record generated is stored. If enough trace records are collected to fill the buffer, tracing is automatically turned off.

10000
A 10,000 kilobyte trace buffer is used.
1-16000
Specify the size of the trace buffer, in kilobytes.

Job name (JOB)

Specifies the job to be traced.

Single values

*
The current job is traced.

Qualifier 1: Job name

name
Specify the name of the job to be traced.

Qualifier 2: User

name
Specify the user name of the job to be traced.

Qualifier 3: Number

000000-999999
Specify the 6-digit number of the job to be traced. All 6 digits must be specified, including zeros.

Thread ID to include (THDID)

Specifies a list of up to twenty threads whose calls and returns are included in the trace. Only trace records for the specified thread identifiers are included.

Single values

*ALL
The calls and returns for all threads are included in the trace.

Other values (up to 20 repetitions)

hexadecimal-value
Specify the identifiers of up to twenty threads whose trace records are to be included.

Examples

STRJOBTRC   MAXSTG(512)

This command starts collecting trace data for the current job. It uses a 512 kilobyte (KB) trace buffer.

Error messages

None