Prashanth:
It's possible, but as is often the case, you need to be careful. For example, when you say that you want to increase the maxdepth of "all local queues", does this include the SYSTEM.* queues?
You also don't indicate what O/S is being used.
Matthias has given you one approach for Windows, and Morag has provided an excellent example of how it can be done if you have MQSCX.
If, however, you are on Linux, and you want an ugly one line command that might work, we can use the following steps to see how it works.
- We can use this command filter to list the local queues for a Queue Manager named QM1
echo "DISPLAY QL(*)" | runmqsc QM1
- Unfortunately, this has lots of extra lines, so we want to remove those from the list.
echo "DISPLAY QL(*)" | runmqsc QM1 | egrep -v "AMQ8409I|^ *TYPE|SYSTEM"
- That's better, but still has some extra lines. We can remove them by only keeping the lines with QUEUE
echo "DISPLAY QL(*)" | runmqsc QM1 | egrep -v "AMQ8409I|^ *TYPE|SYSTEM" | grep QUEUE
- Now, we want to change these lines to be ALTER commands for these queues
echo "DISPLAY QL(*)" | runmqsc QM1 | egrep -v "AMQ8409I|^ *TYPE|SYSTEM" | grep QUEUE | sed -e "s/^ *QUEUE/ALTER QLOCAL/" -e "s/) *TYPE.*$/) MAXDEPTH(50000)/"
- You didn't specify a new MaxDepth, so I picked 50,000 ...
- So, the question then becomes how do we execute these commands? By redirecting them into MQSC again...
echo "DISPLAY QL(*)" | runmqsc QM1 | egrep -v "AMQ8409I|^ *TYPE|SYSTEM" | grep QUEUE | sed -e "s/^ *QUEUE/ALTER QLOCAL/" -e "s/) *TYPE.*$/) MAXDEPTH(50000)/" | runmqsc QM1
This is merely meant to be a demonstration that it can be done. It is not a recommendation that it SHOULD be done.
Use caution, and be careful for what you ask. ;-)
Good luck
Bob
------------------------------
Bob
------------------------------
Original Message:
Sent: Mon February 13, 2023 01:39 PM
From: prashanth katanguri
Subject: increase maxdepth of all local queues
Hello All,
Please share MQ command to increase maxdepth of all local queues in a queue manager. Thank you.
------------------------------
prashanth katanguri
------------------------------