You can start the connection to IBM® MQ by issuing an EXEC CICS SET
MQCONN command in a CICS® application
program.
About this task
The SET MQCONN CONNECTED
command starts all installed MQMONITOR resources that have the attributes AUTOSTART(YES) and
STATUS(ENABLED), including the MQMONITOR resource DFHMQINI that is dynamically created when the
MQCONN attribute INITQNAME contains valid data.
Procedure
-
To start the connection from a CICS application
program using the default connection values, issue the following command:
EXEC CICS SET MQCONN CONNECTED
This command starts a connection using the default connection value for the queue manager
name. This value, which could be the name of a single queue manager or the name of a
queue-sharing group, is taken from the installed MQCONN resource definition for the CICS region.
-
To specify your own connection values when you start the connection from a CICS application program, issue a command like this example:
EXEC CICS SET MQCONN CONNECTED
MQNAME(qqqq)
RESYNC
where qqqq is the 1 - 4 character name of an IBM MQ queue manager or queue-sharing
group.
Results
If the requested queue manager is active, control returns when CICS and IBM MQ are
connected. If the requested queue manager is not active, CICS
returns a NORMAL response with RESP2=8, indicating that the CICS-MQ adapter is in connecting state and
will connect to IBM MQ as soon as the
requested queue manager becomes active.
What to do next
If you specify your own value for MQNAME, the queue manager name or queue-sharing group
that you specified in the MQNAME attribute of the installed MQCONN resource definition is
replaced with the name that you specified on this command. To revert to the original queue
manager or queue-sharing group, set MQNAME again.