ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » How do I clear SOME of the messages from a local queue?

Post new topic  Reply to topic
 How do I clear SOME of the messages from a local queue? « View previous topic :: View next topic » 
Author Message
kodiakk
PostPosted: Wed Jun 17, 2009 8:33 am    Post subject: How do I clear SOME of the messages from a local queue? Reply with quote

Acolyte

Joined: 04 Dec 2007
Posts: 58
Location: Jacksonville, Fl.

I have a situation where my client would like for me to remove the first 23 messages from a queue. I know that there USED to be some sort of destructive get command (amqsget?) that would allow you to specify the number of messages to get. It may have even been a destructive browse (amqsbrowse?)
I'm currently in a Windows environment, running MQ version 6.0.24. I am comfortable using either the command line or GUI, but I am simply not having any luck finding a way to PARTIALLY clear the queue... it seems to be all or nothing.
Any help would be greatly appreciated.

Thanks!
_________________
"Don't take life too seriously... you won't get out of it alive..."
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jun 17, 2009 9:39 am    Post subject: Re: How do I clear SOME of the messages from a local queue? Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

kodiakk wrote:
I know that there USED to be some sort of destructive get command (amqsget?) that would allow you to specify the number of messages to get.


AFAIK amqsget (which isn't a command, but a sample application) has always destructively read all the messages from a queue as supplied by IBM; if you encountered a modified version then that might do anything.

kodiakk wrote:
It may have even been a destructive browse (amqsbrowse?)


A destructive browse is a contradiction in terms, but amqsbcg still exists (again a sample not a command)

kodiakk wrote:
I'm currently in a Windows environment, running MQ version 6.0.24. I am comfortable using either the command line or GUI, but I am simply not having any luck finding a way to PARTIALLY clear the queue... it seems to be all or nothing.


You could use something like qload to unload the entire queue, delete the messages from the file, then reload the queue.

Or modify amqsget to take a parameter of how many message to read. Easy enough change.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jeevan
PostPosted: Wed Jun 17, 2009 10:22 am    Post subject: Re: How do I clear SOME of the messages from a local queue? Reply with quote

Grand Master

Joined: 12 Nov 2005
Posts: 1432

Vitor wrote:
kodiakk wrote:
I know that there USED to be some sort of destructive get command (amqsget?) that would allow you to specify the number of messages to get.


AFAIK amqsget (which isn't a command, but a sample application) has always destructively read all the messages from a queue as supplied by IBM; if you encountered a modified version then that might do anything.

kodiakk wrote:
It may have even been a destructive browse (amqsbrowse?)


A destructive browse is a contradiction in terms, but amqsbcg still exists (again a sample not a command)

kodiakk wrote:
I'm currently in a Windows environment, running MQ version 6.0.24. I am comfortable using either the command line or GUI, but I am simply not having any luck finding a way to PARTIALLY clear the queue... it seems to be all or nothing.


You could use something like qload to unload the entire queue, delete the messages from the file, then reload the queue.

Or modify amqsget to take a parameter of how many message to read. Easy enough change.


Also, if you have any monitoring tools such as BMC Patrol, you can look at and delete message one by one or a number of message at one time or copy or move to another queue.
Back to top
View user's profile Send private message
kodiakk
PostPosted: Wed Jun 17, 2009 10:29 am    Post subject: Reply with quote

Acolyte

Joined: 04 Dec 2007
Posts: 58
Location: Jacksonville, Fl.

Unfortunately, this environment is still in the DEV/TEST phase, so no monitoring tools are implimented yet. I just seem to recall that there was a single command (or sample application) that would perform this, and allow a flag to designate a range of numbers to utilize... I'm just hoping that it's not an "all or nothing" scenario where this is concerned.

Thanks!
_________________
"Don't take life too seriously... you won't get out of it alive..."
Back to top
View user's profile Send private message
zpat
PostPosted: Wed Jun 17, 2009 10:34 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

MO71 can unload a queue with 'purge' and a range of messages can be chosen (23 specified as '0..22').

See the unload option against a queue - you can unload (purge) to a file and then discard the file.
Back to top
View user's profile Send private message
kodiakk
PostPosted: Wed Jun 17, 2009 10:50 am    Post subject: Reply with quote

Acolyte

Joined: 04 Dec 2007
Posts: 58
Location: Jacksonville, Fl.

Thank you Zpat! It's not quite what I remember, but it's effective, non-the-less!
Actually, if you simply browse the queues, there's a DELETE button in there that will allow you to select as many items as you want, and get rid of them that way as well.

Again, thank you!
_________________
"Don't take life too seriously... you won't get out of it alive..."
Back to top
View user's profile Send private message
zpat
PostPosted: Wed Jun 17, 2009 11:13 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

MO71 does almost everything.

The author Paul Clarke is presenting a session on support pacs at the next MQ user group at Hursley UK, July 1st.

www.mqug.org.uk
Back to top
View user's profile Send private message
Sam Uppu
PostPosted: Wed Jun 17, 2009 12:52 pm    Post subject: Reply with quote

Yatiri

Joined: 11 Nov 2008
Posts: 610

You can also use rfhutil to browse or destructive get for each of a msg in the queue.
Back to top
View user's profile Send private message
shashivarungupta
PostPosted: Thu Jun 18, 2009 1:57 am    Post subject: Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

Sam Uppu wrote:
You can also use rfhutil to browse or destructive get for each of a msg in the queue.


I think, kodiakk is looking for the selective messages in a queue.
as he said ".. remove the first 23 messages.." or suppose he wants to pick the message(s) from the middle of the queue.

MO71 is the better option, i would say.
_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Thu Jun 18, 2009 4:19 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I suspect that kodiakk is actually thinking of ma01, not m071.

or a dead simple script on amqsget/amqsgetc.
Back to top
View user's profile Send private message
kodiakk
PostPosted: Thu Jun 18, 2009 4:24 am    Post subject: Reply with quote

Acolyte

Joined: 04 Dec 2007
Posts: 58
Location: Jacksonville, Fl.

Yes, you guys are correct. I am looking to selectively remove items from a queue, either 1-23, or 213-279, something like that. At one point, a number of years ago, I am pretty sure that my teamlead presented us with a simple command (or sample application) that allowed a "destructive browse" or a "get" where we could designate a range of messages.
Anyway, the MO71 support pack did do the trick, and I appreciate all of the feedback.

Thanks guys!
_________________
"Don't take life too seriously... you won't get out of it alive..."
Back to top
View user's profile Send private message
shashivarungupta
PostPosted: Thu Jun 18, 2009 4:28 am    Post subject: Reply with quote

Grand Master

Joined: 24 Feb 2009
Posts: 1343
Location: Floating in space on a round rock.

kodiakk wrote:
Yes, you guys are correct. I am looking to selectively remove items from a queue, either 1-23, or 213-279, something like that. At one point, a number of years ago, I am pretty sure that my teamlead presented us with a simple command (or sample application) that allowed a "destructive browse" or a "get" where we could designate a range of messages.
Anyway, the MO71 support pack did do the trick, and I appreciate all of the feedback.

Thanks guys!



Let us know, if you'd come to know about that command/application some how.
_________________
*Life will beat you down, you need to decide to fight back or leave it.
Back to top
View user's profile Send private message Send e-mail
aditya.aggarwal
PostPosted: Thu Jun 18, 2009 5:31 am    Post subject: Reply with quote

Master

Joined: 13 Jan 2009
Posts: 252

we are using the MQMON utility to remove the message from nth position.
i think it is MO72 only?

Cheers,
Aditya
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » How do I clear SOME of the messages from a local queue?
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.