A data bag is a means of handling properties or parameters of objects using the IBM MQ Administration Interface (MQAI).
Data Bags
The data bag contains zero or more data items. These data items are ordered within the
bag as they are placed into the bag. This is called the insertion order. Each data item
contains a selector that identifies the data item and a value of that data item that
can be either an integer, a 64-bit integer, an integer filter, a string, a string filter, a byte
string, a byte string filter, or a handle of another bag. Data items are described in details in
Types of data item available in the MQAI
There are two types of selector; user selectors and system selectors. These are
described in MQAI
Selectors. The selectors are usually unique, but it is possible to have multiple values for
the same selector. In this case, an index identifies the particular occurrence of selector
that is required. Indexes are described in Indexing in the MQAI.
A hierarchy of these concepts is shown in Figure
1.
Figure 1. Hierarchy of MQAI concepts
The hierarchy has been explained in a previous paragraph.
Types of data bag
We can choose the type of data bag that we want to create depending on the task that we want
to perform:
A bag also created for commands for administering IBM MQ objects. However, unlike the administration bag, the
command bag does not automatically imply certain options although these options are available. For
more information about options, see Create and deleting data bags.
group bag
A bag used to hold a set of grouped data items. Group bags cannot be used for administering
IBM MQ objects.
In addition, the system bag is created by the MQAI when a reply message is returned from
the command server and placed into a user's output bag. A system bag cannot be modified by the user.
Using Data Bags The different ways of using data bags are listed in this topic:
Use Data Bags
The different ways of using data bags are shown in the following list:
Put and receiving data bags using the MQAI
Data can also be sent between applications by putting and getting data bags using the mqPutBag and mqGetBag calls. This lets the IBM MQ Administration Interface (MQAI) handle the buffer rather than the application.
Types of data item available in the MQAI
Data items are used by the IBM MQ Administration Interface (MQAI) to populate data bags when they are created. These data items can be user or system items.