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 » Schedule clearing a local Q

Post new topic  Reply to topic
 Schedule clearing a local Q « View previous topic :: View next topic » 
Author Message
yoscop
PostPosted: Tue Feb 26, 2002 9:01 am    Post subject: Reply with quote

Novice

Joined: 17 Dec 2001
Posts: 13

hi,
I need to be able to run a command file on Win2K box which clears all the messages from a particular Q in MQSeries.Is there a way to do this without writing a java program and calling it from command file.

Regards,
yoscop
Back to top
View user's profile Send private message Yahoo Messenger
mqonnet
PostPosted: Tue Feb 26, 2002 9:08 am    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

Hi yoscop,
Runmqsc, Clear qlocal(<queue name>), does this job. If this is what you are aiming at.

Cheers.
Kumar

_________________
IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator
Back to top
View user's profile Send private message Send e-mail Visit poster's website
StefanSievert
PostPosted: Tue Feb 26, 2002 7:32 pm    Post subject: Reply with quote

Partisan

Joined: 28 Oct 2001
Posts: 333
Location: San Francisco

Hi,
unless this has changed with 5.2, the CLEAR QL command will only work, if the queue object is not in use (=open) at the time.
Another approach is to copy the IBM provided sample amqsget0.c to something like clearq.c and modify it by
1/ specifying a buffer size of 0 (zero) on the MQGET,
2/ set MQGMO_ACCEPT_TRUNCATED_MSG and
3/ treat MQRC_TRUNCATED_MSG_ACCEPTED as O.K.
If you don't have access to a C compiler, I'd be happy to send you a program that does this. Send me a private message if you are interested.
If other people would be interested as well, I can also upload it to the Code Repository (through Brandon?) on this site.
Let me know.
Stefan

_________________
Stefan Sievert
IBM Certified * WebSphere MQ
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 » Schedule clearing a local Q
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.