Author |
Message
|
KAKEZ |
Posted: Sun Feb 16, 2003 11:22 pm Post subject: MQGMO 'ReturnedLength' same as 'DataLength' in MQGET call? |
|
|
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 |
|
 |
mgrabinski |
Posted: Sun Feb 16, 2003 11:51 pm Post subject: |
|
|
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 |
|
 |
bduncan |
Posted: Mon Feb 17, 2003 3:06 pm Post subject: |
|
|
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 |
|
 |
KAKEZ |
Posted: Mon Feb 17, 2003 11:39 pm Post subject: |
|
|
Centurion
Joined: 10 Oct 2002 Posts: 117
|
hi guys, thanks for clear explanations
Jack |
|
Back to top |
|
 |
KAKEZ |
Posted: Tue Feb 18, 2003 12:05 am Post subject: |
|
|
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 |
|
 |
bower5932 |
Posted: Tue Feb 18, 2003 4:41 am Post subject: |
|
|
 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 |
|
 |
|