Remove method


Purpose

The Remove method deletes an item from a bag. This method corresponds to the MQAI call, "mqDeleteItem," in the Programmable command formats reference.


Format

    Remove (Selector, ItemIndex)


Parameters

    Selector (VARIANT) - input
    Selector identifying the item to be deleted.

    MQSEL_ANY_USER_SELECTOR is the default. If the Selector parameter is not of type long, MQRC_SELECTOR_TYPE_ERROR results.

    ItemIndex (LONG) - input
    Index of the item to be deleted.

    MQIND_NONE is the default.

    Note: Either the Selector parameter, ItemIndex parameter, or both must be specified. If neither parameter is present, MQRC_PARAMETER_MISSING results.


Visual Basic Language Invocation

To delete an item from a bag:
mqbag.Remove([Selector],[ItemIndex])