| Author | Message | 
		
		  | Bracken | 
			  
				|  Posted: Thu Jun 24, 2004 7:00 am    Post subject: How can I clear a queue when is handle by an application. |   |  | 
		
		  |  Novice
 
 
 Joined: 07 Mar 2003Posts: 20
 Location: México D.F.
 
 | 
			  
				| Somebody knows if exists some program  or application that can clear the messages on queues which is handle by other application. 
 May be sounds a silly question, but Im really novice on this topics. I will take an MQ Class, but at the moment, I'm need your help.
 
 The novice, again.
   Thanks
 _________________
 SUE
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | mqonnet | 
			  
				|  Posted: Thu Jun 24, 2004 7:23 am    Post subject: |   |  | 
		
		  |  Grand Master
 
 
 Joined: 18 Feb 2002Posts: 1114
 Location: Boston, Ma, Usa.
 
 | 
			  
				| "Somebody knows if exists some program or application that can clear the messages on queues which is handle by other application. " ---As long as other(any) applications dont open this queue, you could very well issue clear qlocal from within runmqsc.
 
 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 |  | 
		
		  |  | 
		
		  | dgolding | 
			  
				|  Posted: Thu Jun 24, 2004 7:57 am    Post subject: |   |  | 
		
		  |  Yatiri
 
 
 Joined: 16 May 2001Posts: 668
 Location: Switzerland
 
 | 
			  
				| Unfortuanately, clear qlocal from runmqsc will fail if there IS an application that has an open handle(input or output, AFAIK) 
 PQEDIT or something will help you here, but I've found the easiest way is to rebuild the sample AMQSGET program and change the buffer size to
 the largest size of message your site is likely to encounter. Then just fire
 it off and let it squirt all those messages into empty space! (Unix fans can
 use /dev/null). A little bit dangerous of course if that's not what you
 wanted to do
   
 Of course, if someone has opened the queue for exclusive input then the
 open from AMQSGET (and any other editor) will fail. Use DIS QSTATUS to
 find out who has got the queue open, and then use a variety of means:
 
 polite message
 subtle threat
 gentle kill
 kill -9
 get his/her boss to fire them
  |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | JT | 
			  
				|  Posted: Thu Jun 24, 2004 8:21 am    Post subject: |   |  | 
		
		  | Padawan
 
 
 Joined: 27 Mar 2003Posts: 1564
 Location: Hartford, CT.
 
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | RogerLacroix | 
			  
				|  Posted: Thu Jun 24, 2004 8:42 am    Post subject: |   |  | 
		
		  |  Jedi Knight
 
 
 Joined: 15 May 2001Posts: 3265
 Location: London, ON  Canada
 
 | 
			  
				| Hi, 
 MQ Visual Edit will also handle this situation.  You can do a standard delete or issue a Clear Queue command from within MQ Visual Edit.  When the user selects the Clear Queue command within MQ Visual Edit, it first checks if anyone has the queue open.  If not, it issue a PCF Clear queue command otherwise it removes the messages issuing a destructive gets.
 
 For more info or to download a 30-day trial of MQ Visual Edit, got to:
 http://www.capitalware.biz/products.html
 
 Regards,
 Roger Lacroix
 Capitalware Inc.
 _________________
 Capitalware: Transforming tomorrow into today.
 Connected to MQ!
 Twitter
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | HugoB | 
			  
				|  Posted: Mon Jun 28, 2004 4:18 am    Post subject: |   |  | 
		
		  | Acolyte
 
 
 Joined: 26 Jun 2001Posts: 67
 
 
 | 
			  
				| Hmm the default installed binary amqstrg will do too, I presume |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | RogerLacroix | 
			  
				|  Posted: Mon Jun 28, 2004 8:23 am    Post subject: |   |  | 
		
		  |  Jedi Knight
 
 
 Joined: 15 May 2001Posts: 3265
 Location: London, ON  Canada
 
 | 
			  
				| Hi, 
 From the program's source code:
 
   
	| Quote: |  
	| AMQSTRG0 is a sample C program that acts as a trigger monitor - reads an initiation queue, then starts the program associated with each trigger message. |  
 Sure, amqstrg can get messages from a queue but I don't think this is a good example for Bracken to use.
 
 Regards,
 Roger Lacroix
 _________________
 Capitalware: Transforming tomorrow into today.
 Connected to MQ!
 Twitter
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | LuisFer | 
			  
				|  Posted: Mon Jun 28, 2004 12:13 pm    Post subject: |   |  | 
		
		  |  Partisan
 
 
 Joined: 17 Aug 2002Posts: 302
 
 
 | 
			  
				| With a little changes (OpenOption & gmoOption to do destructive), the AMQSBCG sample is a good EmpyQ. Regards
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  |  |