[IBM i]

TRCMQM (Trace MQ)

Where allowed to run
All environments (*ALL)
Threadsafe
Yes

The Trace MQ (TRCMQM) command controls tracing for all MQ jobs. TRCMQM, which sets tracing on or off, can trace message queue interface (MQI) functions, function flow, and IBM® MQ for IBM i components together with any messages issued by IBM MQ.

Parameters

Table 1. Command parameters
Keyword Description Choices Notes
TRCEARLY Trace early *NO, *YES Optional, Positional 1
SET Trace option setting *ON, *OFF, *STS, *END Optional, Positional 2
OUTPUT Output *MQM, *MQMFMT, *PEX, *ALL Optional, Positional 3
TRCLEVEL Trace level *DFT, *DETAIL, *PARMS Optional, Positional 4
TRCTYPE Trace types Single values: *ALL Other values (up to 14 repetitions): *API, *CMTRY, *COMMS, *CSDATA, *CSFLOW, *LQMDATA, *LQMFLOW, *OTHDATA, *OTHFLOW, *RMTDATA, *RMTFLOW, *SVCDATA, *SVCFLOW, *VSNDATA Optional, Positional 5
EXCLUDE Exclude types Single values: *NONE Other values (up to 14 repetitions): *API, *CMTRY, *COMMS, *CSDATA, *CSFLOW, *LQMDATA, *LQMFLOW, *OTHDATA, *OTHFLOW, *RMTDATA, *RMTFLOW, *SVCDATA, *SVCFLOW, *VSNDATA Optional, Positional 6
INTERVAL Trace interval 1-32000000, *NONE Optional, Positional 7
MAXSTG Maximum storage to use 1-16, *DFT Optional, Positional 8
DATASIZE Trace data size 1-99999999, *DFT, *ALL, *NONE Optional, Positional 9
MQMNAME Message Queue Manager name Character value, *DFT Optional, Positional 10
JOB Job information Values (up to 8 repetitions): Element list Optional, Positional 11
Element 1: Job name Qualified job name
Qualifier 1: Job name Generic name, name
Qualifier 2: User Character value, X''
Qualifier 3: Number Character value, X''
Element 2: Thread identifier Character value, *NONE, *INITIAL
STRCTL Trace start control Values (up to 8 repetitions): Character value, *NONE Optional, Positional 12
ENDCTL Trace end control Values (up to 8 repetitions): Character value, *NONE Optional, Positional 13

Trace early (TRCEARLY)

Specifies whether early tracing is selected.

Early tracing applies to all jobs for all queue managers. If a queue manager is not currently active or does not exist, then early trace will become effective during start-up or creation.

*NO
Early tracing is not enabled.
*YES
Early tracing is enabled.

Trace option setting (SET)

Specifies the collection of trace records.

The possible values are:

*ON
The collection of trace records is started.

For TRCEARLY(*NO), the collection of trace records will not be started until after the queue manager is available.

*OFF
The collection of trace records is stopped. Trace records are written to files in the trace collection directory.
*STS
The status of any active trace collections are written to a spool file. Any other parameters specified on the TRCMQM will be ignored.
*END
The collection of trace records is stopped for all queue managers.

Output (OUTPUT)

Identifies the type of trace output that this command applies.

The possible values are:

*MQM
This command applies to the collection of binary IBM MQ trace output in the directory specified by the TRCDIR parameter.
*MQMFMT
This command applies to the collection of formatted IBM MQ trace output in the directory specified by the TRCDIR parameter.
*PEX
This command applies to the collection of Performance Explorer (PEX) trace output.
*ALL
This option applies to the collection of both IBM MQ unformatted trace and PEX trace output.

Trace level (TRCLEVEL)

Activates tracing level for flow processing trace points.

The possible values are:

*DFT
Activates tracing at default level for flow processing trace points.
*DETAIL
Activates tracing at high-detail level for flow processing trace points.
*PARMS
Activates tracing at default-detail level for flow processing trace points.

Trace types (TRCTYPE)

Specifies the type of trace data to store in the trace file. If this parameter is omitted, all trace points are enabled.

The possible values are:

*ALL
All the trace data as specified by the following keywords is stored in the trace file.
trace-type-list
You can specify more than one option from the following keywords, but each option can occur only once.
*API
Output data for trace points associated with the MQI and major queue manager components.
*CMTRY
Output data for trace points associated with comments in the MQ components.
*COMMS
Output data for trace points associated with data flowing over communications networks.
*CSDATA
Output data for trace points associated with internal data buffers in common services.
*CSFLOW
Output data for trace points associated with processing flow in common services.
*LQMDATA
Output data for trace points associated with internal data buffers in the local queue manager.
*LQMFLOW
Output data for trace points associated with processing flow in the local queue manager.
*OTHDATA
Output data for trace points associated with internal data buffers in other components.
*OTHFLOW
Output data for trace points associated with processing flow in other components.
*RMTDATA
Output data for trace points associated with internal data buffers in the communications component.
*RMTFLOW
Output data for trace points associated with processing flow in the communications component.
*SVCDATA
Output data for trace points associated with internal data buffers in the service component.
*SVCFLOW
Output data for trace points associated with processing flow in the service component.
*VSNDATA
Output data for trace points associated with the version of IBM MQ running.

Exclude types (EXCLUDE)

Specifies the type of trace data to omit from the trace file. If this parameter is omitted, all trace points specified in TRCTYPE are enabled.

The possible values are:

*ALL
All the trace data as specified by the following keywords is stored in the trace file.
trace-type-list
You can specify more than one option from the following keywords, but each option can occur only once.
*API
Output data for trace points associated with the MQI and major queue manager components.
*CMTRY
Output data for trace points associated with comments in the MQ components.
*COMMS
Output data for trace points associated with data flowing over communications networks.
*CSDATA
Output data for trace points associated with internal data buffers in common services.
*CSFLOW
Output data for trace points associated with processing flow in common services.
*LQMDATA
Output data for trace points associated with internal data buffers in the local queue manager.
*LQMFLOW
Output data for trace points associated with processing flow in the local queue manager.
*OTHDATA
Output data for trace points associated with internal data buffers in other components.
*OTHFLOW
Output data for trace points associated with processing flow in other components.
*RMTDATA
Output data for trace points associated with internal data buffers in the communications component.
*RMTFLOW
Output data for trace points associated with processing flow in the communications component.
*SVCDATA
Output data for trace points associated with internal data buffers in the service component.
*SVCFLOW
Output data for trace points associated with processing flow in the service component.
*VSNDATA
Output data for trace points associated with the version of IBM MQ running.

Trace interval (INTERVAL)

Specifies an interval in seconds that trace should be collected for. If this parameter is omitted then trace will continue to be collected until it is stopped manually via the TRCMQM commands or an FDC with a probe identfier specified in ENDCTL is encountered.

The possible values are:

collection-interval
Specify a value in seconds ranging from 1 through 32000000.

You cannot specify a value for both INTERVAL and ENDCTL.

Maximum storage to use (MAXSTG)

Specifies the maximum size of storage to be used for the collected trace records.

The possible values are:

*DFT
The default maximum is 1 megabyte (1024 kilobytes).
maximum-megabytes
Specify a value ranging from 1 through 16.

Trace data size (DATASIZE)

Specifies the number of bytes of user data included in the trace.

The possible values are:

*DFT
The default trace value is used.
*ALL
All the user data is traced.
*NONE
This option will turn off the trace for sensitive user data.
data-size-in-bytes
Specify a value in ranging from 1 through 99999999.

Message Queue Manager name (MQMNAME)

Specifies the name of the queue manager.

This parameter is only valid when TRCEARLY is set to *NO.

When TRCEARLY is set to *YES all queue managers are traced.

The possible values are:

*DFT
Trace the default queue manager.
queue-manager-name
Specify the name of the queue manager to trace.

Job information (JOB)

Specifies which jobs are to be traced.

The value of this parameter can be one of the following:

generic-jobname
A generic 10 character jobname. All jobs that match the jobname will be enabled to collect trace. For example 'AMQ*' will collect trace for all jobs with a prefix of AMQ.
Job-name/User/Number
A fully qualified jobname. Only the job specified by the qualified jobname will be traced.
Job-name/User/Number/thread-identifier
A fully qualified jobname and associated thread identifier. Only the thread in the job specified by the qualified jobname will be traced. Note that the thread identifer is the internal identifier allocated by IBM MQ, it is not related to the IBM i thread identifier.

Trace start control (STRCTL)

Specifies that trace is started when an FDC with one of the specified probe identifiers is generated.

AANNNNNN
A probe identifier is an 8 character string of the format (AANNNNNN) where A represents alphabetic characters and N represents numeric digits.

Up to 8 probe identifiers may be specified.

Trace end control (ENDCTL)

Specifies that trace is ended when an FDC with one of the specified probe identifiers is generated.

AANNNNNN
A probe identifier is an 8 character string of the format (AANNNNNN) where A represents alphabetic characters and N represents numeric digits.

Up to 8 probe identifiers may be specified.

You cannot specify a value for both ENDCTL and INTERVAL.