ObjectRecOffset (MQLONG)
This is the offset in bytes of the first MQOR object record from the start of the MQOD structure. The offset can be positive or negative. ObjectRecOffset is used only when a distribution list is being opened. The field is ignored if RecsPresent is zero.
When a distribution list is being opened, an array of one or more MQOR object records must be provided in order to specify the names of the destination queues in the distribution list. This can be done in one of two ways:- By using the offset field ObjectRecOffset.
In this case, the application must declare its own structure containing an MQOD followed by the array of MQOR records (with as many array elements as are needed), and set ObjectRecOffset to the offset of the first element in the array from the start of the MQOD. Ensure that this offset is correct and has a value that can be accommodated within an MQLONG (the most restrictive programming language is COBOL, for which the valid range is -999 999 999 through +999 999 999).
Use ObjectRecOffset for programming languages that do not support the pointer data type, or that implement the pointer data type in a way that is not portable to different environments (for example, the COBOL programming language).
- By using the pointer field ObjectRecPtr.
In this case, the application can declare the array of MQOR structures separately from the MQOD structure, and set ObjectRecPtr to the address of the array.
Use ObjectRecPtr for programming languages that support the pointer data type in a way that is portable to different environments (for example, the C programming language).
Whatever technique you choose, use one of ObjectRecOffset and ObjectRecPtr ; the call fails with reason code MQRC_OBJECT_RECORDS_ERROR if both are zero, or both are nonzero.
This is an input field. The initial value of this field is 0. This field is ignored if Version is less than MQOD_VERSION_2.
Parent topic: Fields for MQOD