Author |
Message
|
Shanta |
Posted: Thu Apr 20, 2006 12:35 am Post subject: Clear the queue |
|
|
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 |
|
 |
HubertKleinmanns |
Posted: Thu Apr 20, 2006 12:39 am Post subject: |
|
|
 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 |
|
 |
HubertKleinmanns |
Posted: Thu Apr 20, 2006 12:41 am Post subject: |
|
|
 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 |
|
 |
vennela |
Posted: Thu Apr 20, 2006 4:18 am Post subject: |
|
|
 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 |
|
 |
sandiksk |
Posted: Thu Apr 20, 2006 4:29 am Post subject: |
|
|
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 |
|
 |
HubertKleinmanns |
Posted: Thu Apr 20, 2006 4:50 am Post subject: |
|
|
 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 |
|
 |
jefflowrey |
Posted: Thu Apr 20, 2006 5:00 am Post subject: |
|
|
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 |
|
 |
|