MQ

 View Only

IBM MQ Little Gem #9: DEFCDISP

By Morag Hughson posted Mon February 22, 2016 10:06 PM

  
This is part of a series of small blog posts which will cover some of the smaller, perhaps less likely to be noticed, features of IBM MQ. Read other posts in this series.

QSG Channel commands

Queue Sharing GroupWhen your IBM MQ Queue Manager on z/OS is running as part of a Queue Sharing Group (QSG) you have to decide when working with channels whether the operation you need to do is for a shared channel or a non-shared (referred to as private) channel. You indicate this on the commands you issue with a CHLDISP keyword.

Here are some example commands.

START CHANNEL(TO.CSQ1) CHLDISP(SHARED)

The above command will attempt to start the sender channel as a shared channel. This means that the channel must be reading its messages from a transmission queue that is defined with QSGDISP(SHARED). If the CHLDISP of the command and the QSGDISP of the channel aren't compatible, then you will receive an error.

STOP CHANNEL(TO.QSG2) CHLDISP(SHARED)

The above command will stop a receiver channel. This will do two things; firstly, if there are any running instances of that receiver channel that are shared channels, they will be ended; and secondly, the channel will disabled for use, so no more inbound connections coming through the group listener will be able to start. What this command does not do is stop any inbound connections coming in through the non-group (referred to as INDISP(QMGR)) listener.

If you forget to specify the CHLDISP keyword at all, it will use the default. This is likely to be CHLDISP(PRIVATE) which probably isn't what you wanted when operating in a QSG.

Fixed and Movable Shared Channels

Having decided whether a channel instance is going to be shared, there is one further decision to be made. For the most part your channels are likely going to be suitable to run as CHLDISP(SHARED) channels, being run wherever the QSG determines is the best place. They may be moved to a different queue manager to run when the original queue manager hosting them is unavailable.

However, there may be reasons for wanting a particular shared channel to run on a specific queue manager rather than allowing it to be hosted anywhere. Such reasons include set-ups where the QSG is not a fully cloned set of queue managers, and where there are therefore preferences about where the channel should run, for example because network connectivity outside the plex is only available to half the queue managers in the QSG. In these cases, your channel will be run with CHLDISP(FIXSHARED) which runs it as a shared channel, but on a specific queue manager.

Can you remember

Having set up your shared senders with their shared transmission queues; and your shared listener ports and the receiver channels that should come in through them; and perhaps determined some of your channels to be fixed in place, how do you remember which channels should be using CHLDISP(PRIVATE) or CHLDISP(FIXSHARED) or CHLDISP(SHARED)?

Rather than trying to remember yourself, the answer is to use a channel attribute called DEFCDISP which you can set to the same values that are given in the CHLDISP attribute. Then you can forget about specifying CHLDISP altogether and the command will pick up the default from there instead.


Morag Hughson is an MQ expert. She spent 18 years in the MQ Devt organisation before taking on her current job writing MQ Technical education courses with MQGem. She also blogs for MQGem. You can connect with her here on IMWUC or on Twitter and LinkedIn.

#Little-Gem
#IBMMQ
#ChampionsCorner
0 comments
12 views

Permalink