Defining and installing an MQCONN resource

You must install an MQCONN resource before CICS® can start the connection to IBM® MQ.

About this task

The MQCONN resource specifies the attributes of the connection between CICS and IBM MQ.

Procedure

  1. Create an MQCONN resource with a name and group of your choice, using one of the methods listed in Ways of defining CICS resources.
    If you plan to start the CICS-MQ connection automatically at CICS initialization, place the MQCONN resource in one of the groups named in the list or lists named by the CICS GRPLIST system initialization parameter.
  2. Specify the MQNAME attribute as the 1 - 4 character name of either a single IBM MQ queue manager or a queue-sharing group of IBM MQ queue managers.
    If you specify a queue-sharing group, CICS uses any queue manager in the group, rather than waiting for a single queue manager. Queue-sharing groups increase flexibility when you reconnect to IBM MQ and help you standardize this aspect of CICS setup across CICS regions and z/OS® images.
  3. If you have specified a queue-sharing group of IBM MQ queue managers, use the RESYNCMEMBER attribute to select an appropriate resynchronization strategy for CICS if the connection is lost.
    • RESYNCMEMBER(YES), which is the default, specifies that if there are outstanding units of work for the connection, CICS is to reconnect to the same queue manager, waiting if necessary. This strategy increases the probability of resolving indoubt units of work, but it might increase the time taken to reconnect to IBM MQ.
    • RESYNCMEMBER(NO) specifies that CICS is to make one attempt to reconnect to the same queue manager. If that attempt fails, CICS connects to a different eligible queue manager in the group, and issues message DFHMQ2064 if there are any indoubt units of work with the original queue manager. A queue manager is eligible for connection to a CICS region if it is currently active on the same LPAR as the CICS region. This strategy might reduce the time taken to reconnect to IBM MQ. However, if CICS connects to a different queue manager, indoubt units of work cannot be resolved automatically, and you must resolve them manually.
    • RESYNCMEMBER(GROUPRESYNC) specifies that CICS can connect to any member of the queue-sharing group regardless of any outstanding indoubt units of work. IBM MQ chooses the queue manager that CICS connects to and it asks CICS to resolve indoubt units of work on behalf of all eligible queue managers in the queue-sharing group. This function is called group unit of recovery. This option can be used only when running a release of IBM MQ that supports group unit of recovery for CICS and when group unit of recovery has been enabled in the queue managers.
  4. Specify the INITQNAME attribute as the 1 - 48 character name of a default initiation queue for the connection.
    CICS01.INITQ is the name of the initiation queue defined by the CSQ4INYG object sample.
  5. Install the MQCONN resource.

Results

In addition to installing the MQCONN resource, CICS dynamically 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.

What to do next

If you want to modify and reinstall your MQCONN resource, you must stop the connection between CICS and IBM MQ. You can install an MQCONN resource only when CICS is not connected to IBM MQ.

If you want to change the QNAME attribute of the dynamically installed MQMONITOR, you must first change the INITQNAME attribute of the MQCONN resource and then reinstall the MQCONN resource.

You can install more MQMONITOR resources for monitoring MQ queues, including initiation queues. You can have more than one MQMONITOR resource monitoring an MQ queue.

If you have concerns about the default settings of MQMONITOR DFHMQINI (for example, migrating to DFHMQINI proves more complicated than anticipated), it's possible to install a user-defined MQMONITOR resource with the name of DFHMQINI. This gives you the flexibility in setting the AUTOSTART, STATUS, MONUSERID and USERID attributes to user-defined values so as to be backward compatible, thus making migration easier. The TRANSACTION attribute must be CKTI.