Hi Skid,
With regard to dmpmqmsg, in addition to selecting messages by ID or search strings, it also has a -r parameter providing for a range of messages (select by the sequence in the queue) to be worked on. Take care when using -r that no other applications have the queue open for either input or output, as removal of a message or insertion of a high priority message would affect the message order and potentially lead to the wrong message(s) being deleted.
Regards,
------------------------------
Neil Casey
Senior Consultant
Syntegrity Solutions
Melbourne, Victoria
IBM Champion (Cloud) 2019-21
------------------------------
Original Message:
Sent: Mon October 25, 2021 12:32 PM
From: Matthew Whitehead
Subject: Deleting single or a group of messages on a MQ queue.
It depends how you want to choose which messages to remove, but you could take a look at the dmpmqmsg command. It has options for taking messages from a queue and writing them to a file, and let's you get by various IDs (message, correlation, or group) or by hex/ascii/ebcdic search strings.
------------------------------
Matthew Whitehead
Original Message:
Sent: Mon October 25, 2021 12:11 PM
From: Skid Minix
Subject: Deleting single or a group of messages on a MQ queue.
Is there a way or method to delete individual MQ messages on a queue instead of using MQ Explorer to remove all of them? This is on a Windows 10 server running MQ Server 9.1.
Can this be achieved via MQSC commands? I cannot find anything.
Thanks.
------------------------------
Skid Minix
------------------------------