Question & Answer
Question
You would like to know the different ways to obtain the Current Depth (CURDEPTH) for a queue in an MQ queue manager.
That is, you want to know how many messages are available in the queue.
Answer
The purpose of the article is to explain several ways that can be used to get the Current Depth (CURDEPTH) for a queue:
a) Traditional usage of ‘echo’, ‘runmqsc’, ‘grep’ (local and remote)
a) Traditional usage of ‘echo’, ‘runmqsc’, ‘grep’ (local and remote)
b) MQ Explorer
c) Java PCF
d) Administrative MQ REST API for queue and mqsc (requires MQ Web Server 9.1 or higher)
e) MQ Web Console
f) Queue statistics records: viewed by sample amqsmon
.
f) Queue statistics records: viewed by sample amqsmon
.
Note:
One refinement to queries that could be helpful to you, is the use of the WHERE clause in the DISPLAY command.
Here is the runmqsc command that shows all the local queues that have messages, where the integer attribute for Current Depth is greater than 0 (zero).
DISPLAY QLOCAL(*) WHERE(CURDEPTH GT 0)
One refinement to queries that could be helpful to you, is the use of the WHERE clause in the DISPLAY command.
Here is the runmqsc command that shows all the local queues that have messages, where the integer attribute for Current Depth is greater than 0 (zero).
DISPLAY QLOCAL(*) WHERE(CURDEPTH GT 0)
[{"Type":"SW","Line of Business":{"code":"LOB67","label":"IT Automation \u0026 App Modernization"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSYHRD","label":"IBM MQ"},"ARM Category":[{"code":"a8m0z00000008ObAAI","label":"Components and Features-\u003EAdministration"}],"ARM Case Number":"TS005537495","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)"}]
Was this topic helpful?
Document Information
Modified date:
20 June 2024
UID
ibm16209225