Home

 

Changing information within a bag

 

The MQAI lets you change information within a bag using the mqSet* calls. We can:

  1. Modify data items within a bag. The index allows an individual instance of a parameter to be replaced by identifying the occurrence of the item to be modified (see Figure 1).

    Figure 1. Modifying a single data item


  2. Delete all existing occurrences of the specified selector and add a new occurrence to the end of the bag. (See Figure 2.) A special index value allows all instances of a parameter to be replaced.

    Figure 2. Modifying all data items


The index preserves the insertion order within the bag but can affect the indices of other data items.

The mqSetInteger call lets you modify integer items within a bag. The mqSetInteger64 call lets you modify 64-bit integer items. The mqSetIntegerFilter call lets you modify integer filter items. The mqSetString call lets you modify character-string items. The mqSetStringFilter call lets you modify string filter items. The mqSetByteString call lets you modify byte string items. The mqSetByteStringFilter call lets you modify byte string filter items. Alternatively, we can use these calls to delete all existing occurrences of the specified selector and add a new occurrence at the end of the bag. The data item can be a user item or a system item.

For a full description of these calls, see:

 

Parent topic:

Using data bags


pc15590_


 

Home