+

Search Tips | Advanced Search

Create and deleting data bags


Create data bags

To use the MQAI, you first create a data bag using the mqCreateBag call. As input to this call, you supply one or more options to control the creation of the bag.

The Options parameter of the MQCreateBag call lets you choose whether to create a user bag, a command bag, a group bag, or an administration bag.

To create a user bag, a command bag, or a group bag, we can choose one or more further options to:

  • Use the list form when there are two or more adjacent occurrences of the same selector in a bag.
  • Reorder the data items as they are added to a PCF message to ensure that the parameters are in their correct order. For more information on data items, see Types of data item available in the MQAI.
  • Check the values of user selectors for items that you add to the bag.

Administration bags automatically imply these options.

A data bag is identified by its handle. The bag handle is returned from mqCreateBag and must be supplied on all other calls that use the data bag.

For a full description of the mqCreateBag call, see mqCreateBag.


Delete data bags

Any data bag that is created by the user must also be deleted using the mqDeleteBag call. For example, if a bag is created in the user code, it must also be deleted in the user code.

System bags are created and deleted automatically by the MQAI. For more information about this, see Send administration commands to the qm command server using the mqExecute call. User code cannot delete a system bag.

For a full description of the mqDeleteBag call, see mqDeleteBag.

Parent topic: Data bags and the MQAI

Last updated: 2020-10-04