Home

 

Parameters

 

OptionsBag (MQHBAG) – input

Handle of the bag containing options that control the processing of the call. This is a reserved parameter; the value must be MQHB_NONE.

BufferLength (MQLONG) – input

Length in bytes of the buffer.

Buffer (MQBYTE × BufferLength) – input

Pointer to the buffer containing the message to be converted.

Databag (MQHBAG) – input/output

Handle of the bag to receive the message. The MQAI performs an mqClearBag call on the bag before placing the message in the bag.

CompCode (MQLONG) – output

Completion code.

Reason (MQLONG) – output

Reason code qualifying CompCode.

The following reason codes indicating error conditions can be returned from the mqBufferToBag call:

MQRC_BAG_CONVERSION_ERROR

Data could not be converted into a bag. This indicates a problem with the format of the data to be converted into a bag (for example, the message is not a valid PCF).

MQRC_BUFFER_ERROR

Buffer parameter not valid (invalid parameter address or buffer not accessible).

MQRC_BUFFER_LENGTH_ERROR

Buffer length not valid.

MQRC_HBAG_ERROR

Bag handle not valid.

MQRC_INCONSISTENT_ITEM_TYPE

Datatype of second occurrence of selector differs from datatype of first occurrence.

MQRC_OPTIONS_ERROR

Options bag contains unsupported data items, or a supported option has a value that is not valid.

MQRC_SELECTOR_OUT_OF_RANGE

Selector not within valid range for call.

MQRC_STORAGE_NOT_AVAILABLE

Insufficient storage available.

MQRC_SYSTEM_BAG_NOT_ALTERABLE

System bag cannot be altered or deleted.

 

Parent topic:

mqBufferToBag


pc16400_


 

Home