MQDistributionList class

This class encapsulates a collection of queues - local, remote, or alias for output.

Properties:

Methods:

Creation:

new creates a new MQDistributionList object.

Alternatively, use the AddDistributionList method of the MQQueueManager class.

Syntax:

Dim distlist.As New MQDistributionList
or
Set distlist = New MQDistributionList

AlternateUserId property

Read-write. The alternate user ID used to validate access to the list of queues when they are opened.

Defined in:
MQDistributionList class

Data Type:
String of 12 characters

Syntax:
To get: altuser$ = MQDistributionList.AlternateUserId

To set: MQDistributionList.AlternateUserId = altuser$

CloseOptions property

Read-write. Options used to control what happens when the distribution list is closed. The initial value is MQCO_NONE.

Defined in:
MQDistributionList class

Data Type:
Long

Values:

Syntax:
To get: closeopt& = MQDistributionList.CloseOptions

To set: MQDistributionList.CloseOptions = closeopt&

CompletionCode property

Read-only. The completion code set by the last method or property access issued against the object.

Defined in:
MQDistributionList class

Data Type:
Long

Values:

Syntax:
To get: completioncode& = MQDistributionList.CompletionCode

ConnectionReference property

Read-write. The queue manager to which the distribution list belongs.

Defined in:
MQDistributionList class

Data Type:
MQQueueManager

Syntax:
To get: set queuemanager = MQDistributionList.ConnectionReference

To set: set MQDistributionList. ConnectionReference = queuemanager

FirstDistributionListItem property

Read-only. The first distribution list item object associated with the distribution list.

Defined in:
MQDistributionList class

Data Type:
MQDistributionListItem

Values:

Syntax:
To get: set distributionlistitem = MQDistributionList.FirstDistributionListItem

IsOpen property

Read-only. A value that indicates whether or not the distribution list is currently open.

Defined in:
MQDistributionList class

Data Type:
Boolean

Values:

Syntax:
To get: IsOpen = MQDistributionList.IsOpen

OpenOptions property

Read-write. Options to be used when the distribution list is opened.

Defined in:
MQDistributionList class

Data Type:
Long

Values:
See the WebSphere MQ Application Programming Reference

Syntax:
To get: openopt& = MQDistributionList.OpenOptions

To set: MQDistributionList.OpenOptions = openopt&

ReasonCode property

Read-only. The reason code set by the last method or property access issued against the object.

Defined in:
MQDistributionList class

Data Type:
Long

Values:
See the WebSphere MQ Application Programming Reference

Syntax:
To get: reasoncode& = MQDistributionList.ReasonCode

ReasonName property

Read-only. The symbolic name for the ReasonCode. For example "MQRC_QMGR_NOT_AVAILABLE".

Defined in:
MQDistributionList class

Data Type:
String

Values:
See the WebSphere MQ Application Programming Reference

Syntax:
To get: reasonname$ = MQDistributionList.ReasonName

AddDistributionListItem method

Creates a new MQDistributionListItem object and associates it with the distribution list object. The queue name parameter is mandatory.

The DistributionList property of the distribution list item is set to the owning distribution list and the FirstDistributionListItem property of the distribution list is set to reference this new distribution list item.

For the new distribution list item, the PreviousDistributionListItem property is set to nothing and the NextDistributionListItem property is set to reference any distribution list item that was previously first, or nothing if there was none previously (that is, the new one is inserted in front of those that exist already).

This will return an error if the distribution list is open.

Defined in:
MQDistributionList class

Syntax:
set distributionlistitem = MQDistributionList.AddDistributionListItem (QName$, QMgrName$)

Parameters:

QName$ String. Name of the WebSphere MQ queue.

QMgrName$ String. Name of the WebSphere MQ queue manager.

ClearErrorCodes method

Resets the CompletionCode to MQCC_OK and the ReasonCode to MQRC_NONE for both the MQDistributionList class and the MQSession class.

Defined in:
MQDistributionList class

Syntax:
Call MQDistributionList.ClearErrorCodes()

Close method

Closes a distribution list using the current value of Close options.

Defined in:
MQDistributionList class

Syntax:
Call MQDistributionList.Close()

Open method

Opens each of the queues specified by the QueueName and (where appropriate) QueueManagerName properties of the distribution list items associated with the current object using the current value of AlternateUserId.

Defined in:
MQDistributionList class

Syntax:
Call MQDistributionList.Open()

Put method

Places a message on each of the queues identified by the distribution list items associated with the distribution list.

This method takes an MQMessage object as a parameter. The following distribution list item properties may be altered as a result of this method:

Defined in:

MQDistributionList class

Syntax:

Call MQDistributionList.Put(Message, PutMsgOptions&)

Parameters:

Message MQMessage object representing the message to be put.

PutMsgOptions MQPutMessageOptions object containing options to control the put operation. If not specified, default PutMessageOptions are used.



© IBM Corporation 2002. All Rights Reserved