2312 (0908) (RC2312): MQRC_SELECTOR_WRONG_TYPE
Explanation
A data item with the specified selector exists in the bag, but has a data type that conflicts with the data type implied by the call being used. For example, the data item might have an integer data type, but the call being used might be mqSetString, which implies a character data type.
This reason code also occurs on the mqBagToBuffer, mqExecute, and mqPutBag calls when mqAddString or mqSetString was used to add the MQIACF_INQUIRY data item to the bag.
Completion code
MQCC_FAILED
Programmer response
For the mqSetInteger and mqSetString calls, specify MQIND_ALL for the ItemIndex parameter to delete from the bag all existing occurrences of the specified selector before creating the new occurrence with the required data type.
For the mqInquireBag, mqInquireInteger, and mqInquireString calls, use the mqInquireItemInfo call to determine the data type of the item with the specified selector, and then use the appropriate call to determine the value of the data item.
For the mqBagToBuffer, mqExecute, and mqPutBag calls, ensure that the MQIACF_INQUIRY data item is added to the bag using the mqAddInteger or mqSetInteger calls.
Parent topic: API reason codes