CICS resources for MQ support: MQCONN and MQMONITOR

MQCONN is a CICS® resource that defines the attributes of the connection between CICS and IBM® MQ. MQMONITOR is a CICS resource that defines the attributes of an MQ message consumer, such as the trigger monitor transaction CKTI.

About MQCONN

You must install an MQCONN resource before you start the connection between CICS and IBM MQ.

Only one MQCONN resource definition can be installed at a time in a CICS region. You can install an MQCONN resource only when CICS is not connected to IBM MQ, so if you change your MQCONN definition and reinstall it, you must stop the connection first.

The MQCONN resource specifies the following settings for the connection between CICS and IBM MQ:
  • The name of either a single MQ queue manager or a queue-sharing group of MQ queue managers, to which CICS connects (MQNAME attribute).
  • The resynchronization strategy that CICS adopts if the connection ends with units of work outstanding (RESYNCMEMBER attribute).
  • The name of the default initiation queue for the connection (INITQNAME attribute).

You can use the CICS Explorer®, CEDA, CEMT, or SPI commands to manage the MQCONN resource, and you can also manage it using CICSPlex® SM.

About MQMONITOR

The MQMONITOR resource specifies the following settings for a CICS MQ monitor:
  • The automatic start strategy of the MQMONITOR, which enables the MQMONITOR to start automatically when the connection to an MQ queue manager is established (AUTOSTART attribute).
  • The status of the resource (ENABLESTATUS attribute).
  • Data, if any, to be passed to the transaction monitoring the queue, for example, the CICS-MQ bridge (MONDATA attribute).
  • The name of the MQ queue to be monitored (QNAME attribute).
  • The user ID that the task monitoring the MQ queue will use (MONUSERID attribute).
  • The state of the MQ monitor (MONSTATUS attribute)
  • The transaction ID of the task monitoring the MQ queue (TRANSACTION attribute).
  • The user ID to be used by default for starting application transactions if no suitable user ID is available from any other source (USERID attribute).

You can install any number of 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.

If you want to use an MQMONITOR resource to process incoming messages on an MQ initiation queue, you should define the MQMONITOR resource with the TRANSACTION attribute set to CKTI (or leave blank) and the QNAME attribute set to the name of the MQ initiation queue.

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.

You can use the CICS Explorer, CEDA, CEMT, or SPI commands to manage the MQMONITOR resource, and you can also manage it using CICSPlex SM.

Be aware that when security checking is active, CICS performs security checks on the user ID associated with the transaction that attempts to set the MQ monitor state to started. You must ensure that the user ID is a surrogate of the user ID defined in MONUSERID and is authorized to start transactions associated with the MONUSERID. 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).

What affects MQMONITORs

Several aspects of your CICS region can affect the number of MQGET calls that an MQMONITOR can issue:

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 when this condition exists. For more information, see Alert monitor (CKAM).

About the dynamically installed MQMONITOR resource 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.

CAUTION:
Using the CKQC transaction and MQMONITORs at the same time to manage instances of the CKTI transaction can lead to confusing statistics and state of an MQMONITOR because CKQC is not aware of MQMONITORs and MQMONITORs are not aware of CKTI transactions managed by using CKQC.