The bag must be a user bag. This means that it must have been created using the MQCBO_USER_BAG option on the mqCreateBag call. If the bag was not created in this way, MQRC_WRONG_BAG_TYPE results.
If the selector is less than zero (that is, a system selector), MQRC_SELECTOR_OUT_OF_RANGE results.
If the selector is zero or greater (that is, a user selector) and the bag was created with the MQCBO_CHECK_SELECTORS option, the selector must be in the range MQGA_FIRST through MQGA_LAST; if not, again MQRC_SELECTOR_OUT_OF_RANGE results.
If MQCBO_CHECK_SELECTORS was not specified, the selector can be any value of zero or greater.
If the call is creating a second or later occurrence of a selector that is already in the bag, the datatype of this occurrence must be the same as the datatype of the first occurrence; MQRC_INCONSISTENT_ITEM_TYPE results if it is not.
If the bag is not a group bag, MQRC_BAG_WRONG_TYPE results. If an attempt is made to add a bag to itself, MQRC_HBAG_ERROR results.
The following reason codes indicate error conditions that can be returned from the mqAddBag call:
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
csqzac04316 |