Example 3. Queue manager name is blank or an asterisk (*)
In this example the application is not concerned about which queue manager it connects to. The application issues an MQCONN specifying a blank queue manager name or an asterisk. A suitable channel is chosen.
This is treated in the same way as Example 1. Queue manager name includes an asterisk (*).
Note: If this application were running in an environment other than an IBM® MQ MQI client, and the name was blank, it would be attempting to connect to the default queue manager. This is not the case when it is run from a client environment; the queue manager accessed is the one associated with the listener to which the channel connects.
The application issues:
MQCONN ("")
or
MQCONN (*)
Following the rules, this is what happens in this instance:
- The client channel definition table (CCDT) is scanned in alphabetical channel name sequence, for a queue manager name that is blank, matching with the application MQCONN call.
- The entry for the channel name
ALPHAhas a queue manager name in the definition ofSALE. This does not match the MQCONN call parameter, which requires the queue manager name to be blank. - The next entry is for the channel name
BETA. - The
queue manager namein the definition isSALE. Once again, this does not match the MQCONN call parameter, which requires the queue manager name to be blank. - There are no further entries in the client channel definition table. The application cannot continue and receives return code MQRC_Q_MGR_NOT_AVAILABLE.