Data bags and the MQAI
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.
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:
- user bag
- A simple bag used for user data.
- administration bag
- A bag created for data used to administer IBM MQ objects by sending administration messages to a command server. The administration bag automatically implies certain options as described in Create and deleting data bags.
- command bag
- 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:
- We can create and delete data bags Create and deleting data bags.
- We can send data between applications using data bags Put and receiving data bags using the MQAI.
- We can add data items to data bags Adding data items to bags with the MQAI.
- We can add an inquiry command within a data bag Adding an inquiry command to a bag.
- We can inquire within data bags Inquiring within data bags.
- We can count data items within a data bag Counting data items.
- We can change information within a data bag Change information within a bag.
- We can clear a data bag Clearing a bag using the mqClearBag call.
- We can truncate a data bag Truncating a bag using the mqTruncateBag call.
- We can convert bags and buffers Convert bags and buffers.
- Create and deleting data bags
- 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.
Parent topic: Use the MQAI to simplify the use of PCFs