|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Schedule clearing a local Q |
« View previous topic :: View next topic » |
Author |
Message
|
yoscop |
Posted: Tue Feb 26, 2002 9:01 am Post subject: |
|
|
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 |
|
 |
mqonnet |
Posted: Tue Feb 26, 2002 9:08 am Post subject: |
|
|
 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 |
|
 |
StefanSievert |
Posted: Tue Feb 26, 2002 7:32 pm Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|