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 » MQGMO 'ReturnedLength' same as 'DataLength' in MQGET call?

Post new topic  Reply to topic
 MQGMO 'ReturnedLength' same as 'DataLength' in MQGET call? « View previous topic :: View next topic » 
Author Message
KAKEZ
PostPosted: Sun Feb 16, 2003 11:22 pm    Post subject: MQGMO 'ReturnedLength' same as 'DataLength' in MQGET call? Reply with quote

Centurion

Joined: 10 Oct 2002
Posts: 117

Hi,

thanks for giving me clear information about these two fields:

'ReturnedLength' in MQGMO_VERSION_3 gives "Length of message data returned (bytes)."
and
'DataLength' in MQGET call gives "Length of the message."

are these two values the same?
must we count in that value the size of tthe real user data + size of some headers like MQDLH or others ?

Jack
Back to top
View user's profile Send private message
mgrabinski
PostPosted: Sun Feb 16, 2003 11:51 pm    Post subject: Reply with quote

Master

Joined: 16 Oct 2001
Posts: 246
Location: Katowice, Poland

DataLength is the actual message length. If your message buffer is smaller than the message, DataLength will differ from ReturnedLength.

DataLength is counted as the message length excluding MQMD but including other possible headers.
_________________
Marcin Grabinski <><
Back to top
View user's profile Send private message
bduncan
PostPosted: Mon Feb 17, 2003 3:06 pm    Post subject: Reply with quote

Padawan

Joined: 11 Apr 2001
Posts: 1554
Location: Silicon Valley

Of course you'll only see that (disparity between the two values) if you have the accept truncated messages parameter set in the MQGMO options.
_________________
Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator
Back to top
View user's profile Send private message Visit poster's website AIM Address
KAKEZ
PostPosted: Mon Feb 17, 2003 11:39 pm    Post subject: Reply with quote

Centurion

Joined: 10 Oct 2002
Posts: 117

hi guys, thanks for clear explanations
Jack
Back to top
View user's profile Send private message
KAKEZ
PostPosted: Tue Feb 18, 2003 12:05 am    Post subject: Reply with quote

Centurion

Joined: 10 Oct 2002
Posts: 117

hi, one thing more:

it is said in the documentation (MQGET call) that in the case where :

<--------
However, if the MQGMO_CONVERT option is specified, and the converted
message data is too long to fit in Buffer, the value returned for DataLength is:
v The length of the unconverted data, for queue-manager defined formats.
In this case, if the nature of the data causes it to expand during conversion, the application must allocate a buffer somewhat bigger than the value returned by the queue manager for DataLength.
------->

"somewhat bigger" - so there no way to know the exact size necessary for the converted data?

Jack
Back to top
View user's profile Send private message
bower5932
PostPosted: Tue Feb 18, 2003 4:41 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

I don't believe that you can get the 'somewhat bigger' size. When MQSeries realizes that the buffer isn't large enough, it doesn't go through all of the overhead to convert the message so that it can return the 'somewhat bigger' size.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » MQGMO 'ReturnedLength' same as 'DataLength' in MQGET call?
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.