I do like a concise display when I am making MQSC enquiries of my queue manager. I find it helps to ensure the report is correct, and the output is clear if it only shows what you need to see and nothing spurious.
This is often not possible though because of the attributes that MQ deems necessary to return to you. There are many examples, a few of which follow to illustrate what I mean.
Applications connected to my Queue Manager
If I want to see a quick snapshot of the applications connected to my queue manager I can use the DISPLAY CONN(*) WHERE(APPLTYPE EQ USER) command. This will show me the connection IDs and not a lot else by default:-
CONN(8D08D86400E00040) EXTCONN(414D5143514D31202020202020202020) TYPE(CONN) APPLTYPE(USER)
CONN(8D08D864007F0240) EXTCONN(414D5143514D31202020202020202020) TYPE(CONN) APPLTYPE(USER)
CONN(8D08D86400E10040) EXTCONN(414D5143514D31202020202020202020) TYPE(CONN) APPLTYPE(USER)
CONN(8D08D86400800240) EXTCONN(414D5143514D31202020202020202020) TYPE(CONN) APPLTYPE(USER)
Really what I want to see is the name of the application, and perhaps the user ID it is running with, so I add those two attributes to my command.
DISPLAY CONN(*) WHERE(APPLTYPE EQ USER) APPLTAG USERID
And now I have output like the following because the answer has got too long to fit on a single line per response.
AMQ8276I: Display Connection details.
CONN(8D08D86400E00040) EXTCONN(414D5143514D31202020202020202020) TYPE(CONN)
APPLTAG(MQGem Software MO71) APPLTYPE(USER) USERID(mqgemusr)
AMQ8276I: Display Connection details.
CONN(8D08D864007F0240) EXTCONN(414D5143514D31202020202020202020) TYPE(CONN)
APPLTAG(MQGem Software MQSCX) APPLTYPE(USER) USERID(mqgemusr)
AMQ8276I: Display Connection details.
CONN(8D08D86400E10040) EXTCONN(414D5143514D31202020202020202020) TYPE(CONN)
APPLTAG(MQGem Software MO71) APPLTYPE(USER) USERID(mqgemusr)
AMQ8276I: Display Connection details.
CONN(8D08D86400800240) EXTCONN(414D5143514D31202020202020202020) TYPE(CONN)
APPLTAG(MQGem Software MQSCX) APPLTYPE(USER) USERID(mqgemusr)
Much of this output is taken up showing me the connection IDs, which are actually not interesting when what I’m after is the application names. To make this display more concise, I’d like to be able to remove those attributes that I didn’t actually ask for. Command modifiers in MQSCX is a new feature that allows you to do just that. I can enhance the above command as follows:-
DIS CONN(*) WHERE(APPLTYPE EQ USER) APPLTAG USERID -CONN,EXTCONN,TYPE
and now my output looks like this – back to a single line per response.
APPLTAG(MQGem Software MO71) APPLTYPE(USER) USERID(mqgemusr)
APPLTAG(MQGem Software MQSCX) APPLTYPE(USER) USERID(mqgemusr)
APPLTAG(MQGem Software MO71) APPLTYPE(USER) USERID(mqgemusr)
APPLTAG(MQGem Software MQSCX) APPLTYPE(USER) USERID(mqgemusr)
Depths of Local Queues
When listing local queues to discover the depths of messages on them, you might use the following command.
DISPLAY QLOCAL(*) WHERE(CURDEPTH GT 0)
This would return you the TYPE attribute even though you have only asked for QLOCALs and the TYPE attribute isn’t conveying anything helpful. If you issue this command on a z/OS queue manager, you will also always be returned the QSGDISP attribute, even if you are not running a queue manager in a Queue Sharing Group and the value of that attribute is always QSGDISP(QMGR).
QUEUE(SYSTEM.CHANNEL.SYNCQ) TYPE(QLOCAL) QSGDISP(QMGR) CURDEPTH(10)
QUEUE(SYSTEM.CHLAUTH.DATA.QUEUE) TYPE(QLOCAL) QSGDISP(QMGR) CURDEPTH(3)
QUEUE(SYSTEM.CLUSTER.REPOSITORY.QUEUE) TYPE(QLOCAL) QSGDISP(QMGR) CURDEPTH(3)
QUEUE(SYSTEM.DURABLE.SUBSCRIBER.QUEUE) TYPE(QLOCAL) QSGDISP(QMGR) CURDEPTH(1)
QUEUE(SYSTEM.HIERARCHY.STATE) TYPE(QLOCAL) QSGDISP(QMGR) CURDEPTH(2)
QUEUE(SYSTEM.RETAINED.PUB.QUEUE) TYPE(QLOCAL) QSGDISP(QMGR) CURDEPTH(4)
I can make this display more concise by using modifiers to remove the attributes that I don’t want to see.
DISPLAY QLOCAL(*) WHERE(CURDEPTH GT 0) -TYPE -QSGDISP
QUEUE(SYSTEM.CHANNEL.SYNCQ) CURDEPTH(10)
QUEUE(SYSTEM.CHLAUTH.DATA.QUEUE) CURDEPTH(3)
QUEUE(SYSTEM.CLUSTER.REPOSITORY.QUEUE) CURDEPTH(3)
QUEUE(SYSTEM.DURABLE.SUBSCRIBER.QUEUE) CURDEPTH(1)
QUEUE(SYSTEM.HIERARCHY.STATE) CURDEPTH(2)
QUEUE(SYSTEM.RETAINED.PUB.QUEUE) CURDEPTH(4)
Channel Status
There are quite a number of attributes returned on DISPLAY CHSTATUS, and many of them for very good reason. However, sometimes you want a more concise view of only what you are currently looking to display. Rather than removing each of these many attributes individually by name, you can remove all of them at once and then add back in the ones you actually want to see with the ‘+’ (plus) modifier. Here’s an example of that.
DISPLAY CHSTATUS(*) -ALL +CHANNEL,RQMNAME,LSTMSGDA,LSGMSGTI
CHANNEL(TO.QM3) LSTMSGDA(2023-08-22) LSTMSGTI(17.05.52) RQMNAME(QM3)
CHANNEL(TO.QM4) LSTMSGDA(2023-08-22) LSTMSGTI(17.05.52) RQMNAME(QM4)
CHANNEL(TO.QM2) LSTMSGDA(2023-08-22) LSTMSGTI(17.05.52) RQMNAME(QM2)
CHANNEL(TO.QM1) LSTMSGDA(2023-08-22) LSTMSGTI(17.05.17) RQMNAME(QM4)
CHANNEL(TO.QM1) LSTMSGDA(2023-08-22) LSTMSGTI(17.05.17) RQMNAME(QM2)
CHANNEL(TO.QM1) LSTMSGDA(2023-08-22) LSTMSGTI(17.05.14) RQMNAME(QM3)
Multiple modifiers to add/remove
If you have lots of similarly named attributes to add or remove from your display command output, you can use the # pattern matcher. For example, on channel objects there are several EXIT names, all containing the word “EXIT”. You can remove all those from the output with one modifier, thus:
DISPLAY CHANNEL(*) ALL -#EXIT
I’m sure you have your favourite displays that have attributes you wish you could hide. Well now you can. Use a command modifier to remove any attributes you don’t want displayed to you. Or completely re-design your command output by removing everything and then adding in only those attributes you wish to see.
Remember that if you end up with quite a long command, you can make a synonym to save you having to type it in again.
The new version can be downloaded from the MQSCX Download Page. Any current licensed users of MQSCX can run the new version on their existing licence. If you don’t have a licence and would like to try out MQSCX then send a note to support@mqgem.com and a 1-month trial licence will be sent to you.