Author |
Message
|
perumalj |
Posted: Wed Jul 08, 2009 11:26 pm Post subject: Delete a particular message in Dead.letter.queue. |
|
|
Newbie
Joined: 25 Jun 2009 Posts: 3
|
Hi,
We are using MQM MVS/ESA utlitity for deleting the dead.letter.queue messages, but how to delete only the particular message which we want to delete out of a list of messages in a dead.letter.queue.To be more precise if there are 6 messages then how to delete only the particular 2nd and 4th messages. |
|
Back to top |
|
 |
sumit |
Posted: Wed Jul 08, 2009 11:53 pm Post subject: Re: Delete a particular message in Dead.letter.queue. |
|
|
Partisan
Joined: 19 Jan 2006 Posts: 398
|
perumalj wrote: |
..if there are 6 messages then how to delete only the particular 2nd and 4th messages.. |
You can use q utility (don't remember the support pack number). Browse the messages first, get the message id of those you want to delete, set required flag in q utility and remove only those messages against the selected message id.
Else, you can develop your own code to achieve the same. _________________ Regards
Sumit |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jul 09, 2009 12:00 am Post subject: Re: Delete a particular message in Dead.letter.queue. |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
perumalj wrote: |
how to delete only the particular message which we want to delete out of a list of messages in a dead.letter.queue. |
Same as you would from any queue. A search of the forum will turn up a number of discussions of various methods. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Thu Jul 09, 2009 12:03 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
MO71 can do this (amongst many other things). |
|
Back to top |
|
 |
shashivarungupta |
Posted: Thu Jul 09, 2009 1:44 am Post subject: Re: Delete a particular message in Dead.letter.queue. |
|
|
 Grand Master
Joined: 24 Feb 2009 Posts: 1343 Location: Floating in space on a round rock.
|
Vitor wrote: |
perumalj wrote: |
how to delete only the particular message which we want to delete out of a list of messages in a dead.letter.queue. |
Same as you would from any queue. A search of the forum will turn up a number of discussions of various methods. |
Quote: |
Same as you would from any queue. |
'Same' means the process of deletion not the Intention.(Intention you got to decide.)  _________________ *Life will beat you down, you need to decide to fight back or leave it. |
|
Back to top |
|
 |
aditya.aggarwal |
Posted: Thu Jul 09, 2009 2:03 am Post subject: |
|
|
 Master
Joined: 13 Jan 2009 Posts: 252
|
To delete a message from nth position of queue you can use the MQMON(MO72) support pack..
sumit wrote:
Quote: |
perumalj wrote:
..if there are 6 messages then how to delete only the particular 2nd and 4th messages..
You can use q utility (don't remember the support pack number). Browse the messages first, get the message id of those you want to delete, set required flag in q utility and remove only those messages against the selected message id. |
i don't think that q utility provide this option... How and which flag need to be set in queue utility...Could you please write the full command to delete message from nth position by using q utility..?
Cheers,
Aditya |
|
Back to top |
|
 |
sumit |
Posted: Thu Jul 09, 2009 2:06 am Post subject: |
|
|
Partisan
Joined: 19 Jan 2006 Posts: 398
|
aditya.aggarwal wrote: |
i don't think that q utility provide this option... |
Well.. it does. I don't remember the flags right now.. but you can remove a message with a particular msg id. May be you can look into the readme or help section of q utility. _________________ Regards
Sumit |
|
Back to top |
|
 |
sumit |
Posted: Thu Jul 09, 2009 2:21 am Post subject: |
|
|
Partisan
Joined: 19 Jan 2006 Posts: 398
|
here is the command:
Quote: |
q -I <qname> -m <qmgrname> -g xm<msgid> -dd3 > <o/p file name>
|
_________________ Regards
Sumit |
|
Back to top |
|
 |
aditya.aggarwal |
Posted: Thu Jul 09, 2009 2:23 am Post subject: |
|
|
 Master
Joined: 13 Jan 2009 Posts: 252
|
sumit wrote:
Quote: |
aditya.aggarwal wrote:
i don't think that q utility provide this option...
Well.. it does. I don't remember the flags right now.. but you can remove a message with a particular msg id. May be you can look into the readme or help section of q utility. |
I am able to get only below options in q utility ....
Write Message to a Queue ./q -m [Qmgr Name] -o [Queue Name]
Write Message to a Queue from a file
./q -m [Qmgr Name] -o [Queue Name] -f [File Name]
Read Messages from a Queue (MQGET)
./q -m [Qmgr Name] -I [Queue Name]
Read Messages from a Queue (MQGET) to a file
./q -m [Qmgr Name] -I [Queue Name] > [File name]
Browse a Message from a Queue
./q -m [Qmgr Name] -i [Queue Name]
Browse a Message from a Queue to a file
./q -m [Qmgr Name] -i [Queue Name] > [File Name]
Browse a Message from a Queue (Hex)
./q -m [Qmgr Name] -i [Queue Name] -dh
Browse a Message from a Queue (MQMD)
./q -m [Qmgr Name] -i [Queue Name] -dd3
Copy Messages between Queues
./q -m [Qmgr Name] -i [Src Queue Name] -o [Target Queue Name]
Move Messages between Queues
./q -m [Qmgr Name] -I [Src Queue Name] -o [Target Queue Name]
if you have the option to delete the message from nth position by using q utility then post here...
because i still belive that q utility can not remove messages from nth positions...
Cheers,
Aditya |
|
Back to top |
|
 |
aditya.aggarwal |
Posted: Thu Jul 09, 2009 2:42 am Post subject: |
|
|
 Master
Joined: 13 Jan 2009 Posts: 252
|
Quote: |
here is the command:
Quote:
q -I <qname> -m <qmgrname> -g xm<msgid> -dd3 > <o/p file name> |
Thanks sumit...i am checking it...
Cheers,
Aditya |
|
Back to top |
|
 |
sumit |
Posted: Thu Jul 09, 2009 5:05 am Post subject: |
|
|
Partisan
Joined: 19 Jan 2006 Posts: 398
|
aditya.aggarwal wrote: |
because i still belive that q utility can not remove messages from nth positions... |
I never mentioned position. I told about msgid. _________________ Regards
Sumit |
|
Back to top |
|
 |
RaviKrG |
Posted: Thu Jul 09, 2009 5:16 am Post subject: |
|
|
 Master
Joined: 07 Sep 2008 Posts: 240
|
MO71 will surely do the job |
|
Back to top |
|
 |
zpat |
Posted: Thu Jul 09, 2009 5:31 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
RaviKrG wrote: |
MO71 will surely do the job |
As I have already posted. |
|
Back to top |
|
 |
aditya.aggarwal |
Posted: Sat Jul 11, 2009 7:07 am Post subject: |
|
|
 Master
Joined: 13 Jan 2009 Posts: 252
|
sumit wrote:
Quote: |
here is the command:
Quote:
q -I <qname> -m <qmgrname> -g xm<msgid> -dd3 > <o/p file name> |
Yest this command works wor msgid...after browsing message in to queue it delete the message based upon message id..
Thanks sumit..
Best Regards,
Aditya |
|
Back to top |
|
 |
muthum_2000 |
Posted: Wed Jul 15, 2009 1:20 am Post subject: |
|
|
 Voyager
Joined: 10 Jul 2006 Posts: 85
|
Use qload utility(free support pac from IBM)
http://www-1.ibm.com/support/docview.wss?uid=swg24009368
Commands:
No messages are removed from the queue as the lower case “i” instructs qload to use browse.
qload –m QMNAME –i QNAME –f VTNUMBER.backup.txt –dA
Unload first message on queue Q1, without deleting:
qload –m QMNAME –i Q1 –f VT1234567.Q1.M1.txt –dA –r1
Unload and remove first message on queue Q1, with deletion:
qload –m QMNAME –I Q1 –f VT1234567.Q1.M1.txt –dA –r1
Unload and remove 10 messages, starting at message 52:
qload –m QMNAME –I Q1 –f VT1234567.Q1.M5362.txt –dA –r53#10
Unload and remove messages from 53 to 62:
qload –m QMNAME –I Q1 –f VT1234567.Q1.M5362.txt –dA –r53..62 |
|
Back to top |
|
 |
|