mq lab 2
DESCRIPTION
MQ tutorialTRANSCRIPT
Get messages from a Remote queue:As discussed in class, try to pull messages from a remote queue, it shows below error messages Unable to open queue for input.
And MQOPEN (a MQI call to open a queue to allow further actions) failed with a reason code 2045. These reason codes are very important in understanding the reason for failure and next approach.
Understanding MQ reason code:
Try executing in command window with mqrc . Here, It should be mqrc 2045
This shows MQ options is not valid. A remote queue is not intended to store any messages so trying to pull a message is a wrong action on it. We can search this error details in google or IBM infocenter which will be provided to you. Some more examples
Disabling a queue from placing a message:For altering the queue, we need to use alter command and change the PUT attribute of the queue to disabled.
Check the remote queue put attribute value.
From command mode, run this amqsput and it fails with reason code 2051.
Check what does reason code 2051 means.
This tells us that particular remote queue is disabled for placing messages on it. Disable getting the message from a queue:
Similar to the above, change the GET attribute of the local queue in QMTEST queue manager to disabled.
Try to get messages from it and see what the output is. Understand its reason code.
General runmqsc commands:Display channel(*)
Display channel(QM*)
Display Queue(*)
Display Queue(QM*)
Display Qlocal(*)
Display Qlocal(QM*)
Display Qremote(*)
Display Qremote(QM*)
Analyze the output of these commands in those 2 queue managers.