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 » Not able to browse the contents of a queue

Post new topic  Reply to topic
 Not able to browse the contents of a queue « View previous topic :: View next topic » 
Author Message
raj
PostPosted: Mon Mar 01, 2004 7:46 am    Post subject: Not able to browse the contents of a queue Reply with quote

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
View user's profile Send private message
clindsey
PostPosted: Mon Mar 01, 2004 8:34 am    Post subject: Reply with quote

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
View user's profile Send private message
raj
PostPosted: Mon Mar 01, 2004 8:40 am    Post subject: hi Reply with quote

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
View user's profile Send private message
bower5932
PostPosted: Mon Mar 01, 2004 11:07 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
RogerLacroix
PostPosted: Mon Mar 01, 2004 2:03 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
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
View user's profile Send private message Visit poster's website
clindsey
PostPosted: Mon Mar 01, 2004 2:11 pm    Post subject: Reply with quote

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
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 » Not able to browse the contents of a queue
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.