Truncate method

Purpose

The Truncate method reduces the number of user items in a bag. This method corresponds to the MQAI call, "mqTruncateBag," in the WebSphere MQ Programmable Command Formats and Administration Interface.

Format

Truncate (ItemCount)

Parameters

ItemCount (LONG) - input
The number of user items to remain in the bag after truncation has occurred.

Visual Basic Language Invocation

To reduce the number of user items in a bag:

mqbag.Truncate(ItemCount)