Count property


Purpose

The Count property represents the number of data items within a bag. This property corresponds to the MQAI call, "mqCountItems," in the Programmable command formats reference.


Format

    Count (Selector, Value)


Parameters

    Selector (VARIANT) - input
    Selector of the data items to be included in the count.

    MQSEL_ALL_USER_SELECTORS is the default.

    If the Selector is not of type long, MQRC_SELECTOR_TYPE_ERROR is returned.

    Value (LONG) - output
    The number of items in the bag included by the Selector.


Visual Basic Language Invocation

To return the number of items in a bag:
ItemCount = mqbag.Count([Selector])