Start Job Trace (STRJOBTRC)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

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 on the Data option prompt (DTAOPT parameter) of the End Trace (ENDTRC) command may be used to stop the job trace (turn it off without recording any collected data).

Top

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
Top

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 10000K trace buffer is used.
maximum-K-bytes
Specify the size of the trace buffer in kilobytes (one kilobyte equals 1024 bytes).
Top

Job name (JOB)

Specifies the job to be traced. A job identifier is either the special value, *, or the job-identifier name and library with up to three elements, such as job-number/user-name/ job-name.

*
The current job is traced.
job-name
Specify the name of the job to be traced.
user-name
Specify the user name of the job to be traced.
job-number
Specify the 6-digit number of the job to be traced. All 6 digits must be specified, including zeros.
Top

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

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

Examples

STRJOBTRC   MAXSTG(512)

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

Top

Error messages

None

Top