Example 1. Queue manager name includes an asterisk (*)

In this example the application is not concerned about which queue manager it connects to. The application issues an MQCONN call for a queue manager name including an asterisk. A suitable channel is chosen.

The application issues:

MQCONN (*SALE)
Following the rules, this is what happens in this instance:
  1. The client channel definition table (CCDT) is scanned for the queue manager name SALE, matching with the application MQCONN call.
  2. Channel definitions for ALPHA and BETA are found.
  3. If one channel has a CLNTWGHT value of 0, this channel is selected. If both have a CLNTWGHT value of 0, channel ALPHA is selected because it is first in alphabetical sequence. If both channels have a non-zero CLNTWGHT value, one channel is randomly selected, based on its weighting.
  4. An attempt to start the channel is made.
  5. If channel BETA was selected, the attempt to start it is successful.
  6. If channel ALPHA was selected, the attempt to start it is NOT successful because the communication link is broken. The following steps then apply:
    1. The only other channel for the queue manager name SALE is BETA.
    2. An attempt to start this channel is made - this is successful.
  7. A check to see that a listener is running shows that there is one running. It is not connected to the SALE queue manager, but because the MQI call parameter has an asterisk (*) included in it, no check is made. The application is connected to the SALE_BACKUP queue manager and continues processing.