| Author | 
		  Message
		 | 
		
		  | raj | 
		  
		    
			  
				 Posted: Mon Mar 01, 2004 7:46 am    Post subject: Not able to browse the contents of a queue | 
				     | 
			   
			 
		   | 
		
		
		   Centurion
 
 Joined: 31 Mar 2002 Posts: 104
  
  | 
		  
		    
			  
				Hi,
 
 
I am trying to browse the contents of a queue using  amqsbcg .But it doesnt allow me.It gives the following error. Couuld any one please suggest a possible reason??
 
 
AMQSBCG0 - starts here
 
**********************
 
 
 MQOPEN - 'PRD_BADMESSAGE_QUEUE'
 
 
 MQGET 1, failed with CompCode:1 Reason:2080
 
 MQCLOSE
 
 MQDISC
 
_____________
 
Thanks
 
Raj | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | clindsey | 
		  
		    
			  
				 Posted: Mon Mar 01, 2004 8:34 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Knight
 
 Joined: 12 Jul 2002 Posts: 586 Location: Dallas, Tx 
  | 
		  
		    
			  
				amqsbcg0.c only allocates a buffer size of 32767
 
 
#define    BUFFERLENGTH  32767  /* Max length of message accepted */
 
 
rc 2080 says it tried to get a message larger than this.
 
 
You must make modifications to amqsbcg0.c and rebuild it before you can browse larger messages. Either increase the buffer size and BUFFERLENGTH or let it get truncated messages and only show the 1st x bytes of the message.
 
 
Charlie | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | raj | 
		  
		    
			  
				 Posted: Mon Mar 01, 2004 8:40 am    Post subject: hi | 
				     | 
			   
			 
		   | 
		
		
		   Centurion
 
 Joined: 31 Mar 2002 Posts: 104
  
  | 
		  
		    
			  
				Hi ,
 
 
Can i just modify the existing amqsbcg0 to increase buffer length?? Or a altogether new program has be used??
 
 
Thanks
 
Raj | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | bower5932 | 
		  
		    
			  
				 Posted: Mon Mar 01, 2004 11:07 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Knight
 
 Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA 
  | 
		  
		    
			  
				You can modify amqsbcg0.c, recompile it, and you should be good to go.  
 
 
However, if you run into messages that are larger than the value you pick, you'll still get the problem.  You might consider altering the program to accept a truncated message (MQGMO_ACCEPT_TRUNCATED_MSG) and then you can print a warning that the message data is truncated. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | RogerLacroix | 
		  
		    
			  
				 Posted: Mon Mar 01, 2004 2:03 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Knight
 
 Joined: 15 May 2001 Posts: 3265 Location: London, ON  Canada 
  | 
		  
		    
			  
				Hi,
 
 
If you are looking for a stand-alone application to browse / edit messages in a queue, then might I suggest you try out MQ Visual Edit.  It can do that plus more.
 
 
To download a 30-day trial of MQ Visual Edit go to:
 
http://www.capitalware.biz/products.html
 
 
Regards,
 
Roger Lacroix
 
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
 
Connected to MQ!
 
Twitter | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | clindsey | 
		  
		    
			  
				 Posted: Mon Mar 01, 2004 2:11 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Knight
 
 Joined: 12 Jul 2002 Posts: 586 Location: Dallas, Tx 
  | 
		  
		    
			  
				If you really need to browse the complete message content, I would allocate the buffer dynamically. When the MQGET returns the 2080, it also gives you the size of the message on the queue. Just allocate a buffer this size and re-issue the MQGET.
 
 
Would you be interested in a java version of amqsbcg? I can't believe bower5932 didn't mention this one, since he is the author  
 
Go to http://www.developer.ibm.com/tech/sampmq.html and look for mqbrowse.java.
 
 
Charlie | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |