MQMONITOR resources

An MQMONITOR resource defines attributes for IBM® MQ message consumers, such as the trigger monitor transaction CKTI. Using an MQMONITOR enables the associated transaction that services an MQ queue to restart automatically when the connection to the IBM MQ queue manager is established.

You can use MQMONITOR resources to process incoming messages on MQ queues including initiation queues. You can have more than one MQMONITOR resource processing incoming messages on an MQ queue.

An installed and started MQMONITOR resource monitors the MQ queue that is either specified in the resource attribute QNAME or supplied to the transaction through the MONDATA attribute.

When you define an MQMONITOR resource for processing incoming messages on an MQ initiation queue, ensure that the TRANSACTION attribute specifies CKTI or is blank and that the QNAME attribute specifies the name of the MQ initiation queue to be monitored.

When a user-written MQ monitor program, rather than the default CKTI, is to be used with an MQMONITOR resource, it is the responsibility of the user-written program to get messages directly from application queues and perform the required logic. When you code your program, ensure to follow the guidelines described in Developing and using user-written MQ trigger monitors and MQ message consumers.

In order for CICS® to attempt to automatically start the transaction associated with an MQMONITOR, the MQMONITOR must be installed with attributes AUTOSTART(YES) and STATUS(ENABLED). When the connection between CICS and MQ has been established, CICS will start MQ monitors that have been installed with attributes AUTOSTART(YES) and STATUS(ENABLED) if the user ID associated with the task that set the MQCONN resource to CONNECTED has sufficient authority to start the associated transactions.

MQMONITORs are automatically stopped when CICS disconnects from the IBM MQ queue manager.

What affects MQMONITORs

Active z/OS® Workload Manager Health service

If z/OS Workload Manager Health service is active in the CICS region, MQMONITORs react to the region's health state and might be subject to the setting of the z/OS Workload Manager Health service open status. For details, see Effect of z/OS Workload Manager Health service on MQMONITORs.

CICS under MXT condition

If CICS encounters an MXT condition, a restriction is imposed on the number of MQGET calls an MQMONITOR can issue per second while this condition exists. For more information, see Alert monitor (CKAM).

Note: To determine whether MXT gating has taken place, see Interpreting transaction statistics.

Installation considerations

For information about working with BAS, see Working with BAS MQMONITOR resource definitions.

Security considerations

User ID for the transaction
If security checking is active (that is, the SEC system initialization parameter is set to YES), the user ID to be associated with the transaction is obtained from the MONUSERID attribute of the MQMONITOR resource.

If security checking is disabled (that is, SEC is set to NO), the user ID to be associated with the MQ monitor transaction is the user ID of the transaction that set the state of the MQMONITOR resource to started.

Security checks performed by CICS when setting the MQ monitor state to started
If security checking is active, when setting the MQ monitor state to started, CICS performs security checks on the user ID of the transaction that attempts to set the MQ monitor state to started, as follows:
Note: In the case of setting the MQ monitor state through a CICSPlex® SM API interface such as the CICS Explorer®, the user ID to be associated with the MQ monitor transaction is either the region user ID or the PLTPIUSR user ID (if specified).
  • CICS verifies that the user ID is a surrogate of the user ID defined in MONUSERID.
  • CICS verifies that the user ID is authorized to start transactions associated with the user ID defined in MONUSERID.

DFHMQINI

When you install an MQCONN resource that specifies a value in the INITQNAME attribute, CICS also dynamically creates and installs an MQMONITOR resource with the reserved name of DFHMQINI representing the default initiation queue.

DFHMQINI has the following attributes:
QNAME
Specifies the initiation queue name.
TRANSACTION
CKTI (by default)
MONUSERID
This attribute is obtained as follows:
  • From the PLTPIUSR system initialization parameter, if available
  • Otherwise, from the CICS region user ID
USERID
The value is the CICS default user ID.

DFHMQINI is automatically started when the MQ connection is established, and the user ID associated with the CKTI transaction is obtained from MONUSERID.

You can use the EXEC CICS INQUIRE MQMONITOR or CEMT INQUIRE MQMONITOR command to inquire on the QNAME attribute of the dynamically created MQMONITOR resource. If you want to change this QNAME value, you must first change the INITQNAME attribute of the MQCONN resource and then reinstall the MQCONN resource. When you discard an MQCONN resource that includes a setting for the INITQNAME attribute, the dynamically created MQMONITOR resource and any user-defined MQMONITOR resources are also discarded.