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 Discussion » Clear the queue

Post new topic  Reply to topic
 Clear the queue « View previous topic :: View next topic » 
Author Message
Shanta
PostPosted: Thu Apr 20, 2006 12:35 am    Post subject: Clear the queue Reply with quote

Voyager

Joined: 01 Sep 2005
Posts: 81

Is there any command to clear the queue as we can do it in MQ6.0 Explorer using MQGet API call.. though the object is in use

I want to clear the queue using clear qlocal(xxxx) but i am getting the mesage as object is in use because O/P count is 1 .



Please help
Shanta
Back to top
View user's profile Send private message
HubertKleinmanns
PostPosted: Thu Apr 20, 2006 12:39 am    Post subject: Reply with quote

Shaman

Joined: 24 Feb 2004
Posts: 732
Location: Germany

You could use the supportpac MA01 (the q utility) or adapt the sample amqsput programm and recompile it with a larger buffer size.
_________________
Regards
Hubert
Back to top
View user's profile Send private message Visit poster's website
HubertKleinmanns
PostPosted: Thu Apr 20, 2006 12:41 am    Post subject: Reply with quote

Shaman

Joined: 24 Feb 2004
Posts: 732
Location: Germany

HubertKleinmanns wrote:
You could use the supportpac MA01 (the q utility) or adapt the sample amqsput programm and recompile it with a larger buffer size.


I forgot my favorite admin tool, the supportpac MO71 (MQMON).
_________________
Regards
Hubert
Back to top
View user's profile Send private message Visit poster's website
vennela
PostPosted: Thu Apr 20, 2006 4:18 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Looks like there is no MQSC command available to clear with API calls. Maybe that's only MQExplorer feature.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sandiksk
PostPosted: Thu Apr 20, 2006 4:29 am    Post subject: Reply with quote

Centurion

Joined: 08 Jun 2005
Posts: 133

you cant clear a queue when it is in use. you have to find out the aplpication that has opened the queue and stop that.
do a dis qstatus(queuename) type(handle) all .
search the forum for more details. This is just runmqsc command.
Back to top
View user's profile Send private message
HubertKleinmanns
PostPosted: Thu Apr 20, 2006 4:50 am    Post subject: Reply with quote

Shaman

Joined: 24 Feb 2004
Posts: 732
Location: Germany

sandiksk,

the tools I described above read the contents of a message one-by-one. So they are able, to "clear" a queue, which is in use. But the MQSC command CLEAR QL(...) only resets the pointers to the messages and is much faster, than reading all the messages with MQGET.
_________________
Regards
Hubert
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Thu Apr 20, 2006 5:00 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

And it makes sense that you wouldn't be able to use runmqsc to GET messages, since runmqsc is not otherwise an MQ application - it doesn't use the MQ API. Why they didn't add it to the PCF command is a different question, since the command server is already an MQI application. Probably, though, the assumption is that if you're connecting to the queue manager already and wanting to clear a queue - you can just open and get the messages yourself so why should the command server do it for you?
_________________
I am *not* the model of the modern major general.
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 Discussion » Clear the 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.