DataOffset property

Read-write. The current position within the Message Data portion of the message object.

The value is expressed as a byte offset from the start of the message data buffer; the first character in the buffer corresponds to a DataOffset value of zero.

A read or write method commences its operation at the character referenced by DataOffset. These methods process data in the buffer sequentially from this position, and update DataOffset to point to the byte (if any) immediately following the last byte processed.

DataOffset may take only values in the range zero to MessageLength inclusive. When DataOffset = MessageLength it is pointing to the end, that is the first invalid character of the buffer. Write methods are permitted in this situation - they extend the data in the buffer and increase MessageLength by the number of bytes added. Reading beyond the end of the buffer is not valid.

The initial value is zero.

Defined in: MQMessage class

Data Type: Long

Syntax:
To get: currpos& = MQMessage.DataOffset

To set: MQMessage.DataOffset = currpos&