Home

 

Buffer (MQBYTExBufferLength) - output

This is the area to contain the message data. Align the buffer on a boundary appropriate to the nature of the data in the message. 4-byte alignment should be suitable for most messages (including messages containing MQ header structures), but some messages might require more stringent alignment. For example, a message containing a 64-bit binary integer might require 8-byte alignment.

If BufferLength is less than the message length, as much of the message as possible is moved into Buffer; this happens whether or not MQGMO_ACCEPT_TRUNCATED_MSG is specified on the GetMsgOpts parameter (see MQGMO - Options field for more information).

The character set and encoding of the data in Buffer are given by the CodedCharSetId and Encoding fields returned in the MsgDesc parameter. If these are different from the values required by the receiver, the receiver must convert the application message data to the character set and encoding required. The MQGMO_CONVERT option can be used (with a user-written exit if necessary) to convert the message data; see MQGMO - Get-message options for details of this option.

Note:
All the other parameters on the MQGET call are in the character set and encoding of the local queue manager (given by the CodedCharSetId queue-manager attribute and MQENC_NATIVE, respectively).

If the call fails, the contents of the buffer might still have changed.

In the C programming language, the parameter is declared as a pointer-to-void: the address of any type of data can be specified as the parameter.

If the BufferLength parameter is zero, Buffer is not referred to; in this case, the parameter address passed by programs written in C or System/390 assembler can be null.



 

Home