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 » IBM MQ API Support » Clearing the contents of a queue using an API

Post new topic  Reply to topic
 Clearing the contents of a queue using an API « View previous topic :: View next topic » 
Author Message
paul0al
PostPosted: Wed Aug 14, 2002 3:30 pm    Post subject: Clearing the contents of a queue using an API Reply with quote

Apprentice

Joined: 30 May 2002
Posts: 26

I use MQ Explorer on MQ v5.2.1 for win2k. Whenever I need to clear the contents of a queue, I right click on the queue and select All Tasks and Clear Messages. I would like to add the same capability in my MQ program. Does any of the MQSeries API provides a capability to clear out the content of an entire queue with one API call?

thanks.
Back to top
View user's profile Send private message
clindsey
PostPosted: Wed Aug 14, 2002 5:28 pm    Post subject: Reply with quote

Knight

Joined: 12 Jul 2002
Posts: 586
Location: Dallas, Tx

Take a look at this thread:
http://www.mqseries.net/phpBB2/viewtopic.php?t=4719

Both C and java code are posted there to do what you are looking for. Using java pcf requires SupportPac MS0B.

Charlie
Back to top
View user's profile Send private message
jc_squire
PostPosted: Wed Aug 14, 2002 6:39 pm    Post subject: Reply with quote

Centurion

Joined: 14 Apr 2002
Posts: 105
Location: New Zealand

a short and dirty alternative :

echo "clear ql(xxx) | runmqsc"

however this will only work if there are no processes that has the queue open.
_________________
J C Squire
IBM Certified Specialist - MQSeries
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 » IBM MQ API Support » Clearing the contents of a queue using an API
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.