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 » IBM MQ API Support » size of next availble msg

Post new topic  Reply to topic
 size of next availble msg « View previous topic :: View next topic » 
Author Message
Schwab
PostPosted: Fri Feb 01, 2002 5:30 pm    Post subject: Reply with quote

Novice

Joined: 26 Oct 2001
Posts: 11

Hi,
In MQGET() call we pass buffer to receive the msg.
Is there any way to find the size of the message before calling
MQGET(). So that we can create the buffer of that size and pass it to MQGET().

Prog interface: C MQI.
Op sys: Windows2000.

Regards
Schwab.
Back to top
View user's profile Send private message
kolban
PostPosted: Fri Feb 01, 2002 6:01 pm    Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

You can do a browse operation prior to the get. Alterantively, do the get but supply a buffer that is too small. The MQGET will fail but will return the size of the required buffer. You can then re-execute the get with a larger buffer. You will have to handle the TRUNCATED MSG return code yourself until a big enough buffer is supplied.
Back to top
View user's profile Send private message
Schwab
PostPosted: Wed Feb 06, 2002 2:52 pm    Post subject: Reply with quote

Novice

Joined: 26 Oct 2001
Posts: 11

Back to top
View user's profile Send private message
Schwab
PostPosted: Wed Feb 06, 2002 2:53 pm    Post subject: Reply with quote

Novice

Joined: 26 Oct 2001
Posts: 11


Sencond Option works great.

Thanks
schwab
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 » IBM MQ API Support » size of next availble msg
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.