WriteUInt2 method

This method takes a signed 4-byte integer value and writes it into the Message Data buffer as a 2-byte unsigned binary number starting at the byte referred to by DataOffset. It replaces any data already at these positions in the buffer, and extends the length of the buffer (MQMessage.MessageLength) if necessary.

DataOffset is incremented by 2 if the method succeeds.

The method converts to the binary representation specified by the MQMessage.Encoding property. The value specified should be in the range 0 to 2**16-1. If it is not the method returns with CompletionCode MQCC_FAILED and ReasonCode MQRC_WRITE_VALUE_ERROR.

Defined in: MQMessage class

Syntax:
Call MQMessage.WriteUInt2(value& )

Parameter value& Long. Value to be written.