AccessQueue method

Creates an MQQueue object and associates it with this MQQueueManager object by setting the connection reference property of the queue. It sets the Name, OpenOptions, DynamicQueueName, and AlternateUserId properties of the MQQueue object to the values provided, and attempts to open it.

If the open is unsuccessful the call fails. An error event is raised against the object. The ReasonCode and CompletionCode, and the MQSession ReasonCode and CompletionCode of the object are set.

The DynamicQueueName, QueueManagerName, and AlternateUserId parameters are optional and default to "".

The OpenOption MQOO_INQUIRE should be specified in addition to other options if queue properties are to be read.

Do not set the QueueManagerName, or set it to "" if the queue to be opened is local. Otherwise, set it to the name of the remote queue manager that owns the queue, and an attempt is made to open a local definition of the remote queue. For more information about remote queue name resolution and queue manager aliasing, see What are aliases? .

If the Name property is set to a model queue name, specify the name of the dynamic queue to be created in the DynamicQueueName$ parameter. If the value provided in the DynamicQueueName$ parameter is "", the value set into the queue object and used on the open call is "AMQ.*". See Creating dynamic queues for more information about naming dynamic queues.

Definition

Defined in: MQQueueManager class.

Syntax

Syntax: set queue = MQQueueManager.AccessQueue(Name$, OpenOptions&, QueueManagerName$, DynamicQueueName$, AlternateUserId$)

Parameters

Name$ String. Name of WebSphere® MQ queue.

OpenOptions: Long. Options to be used when queue is opened. See OpenOptions (MQLONG).

QueueManagerName$ String. Name of the queue manager that owns the queue to be opened. A value of "" implies the queue manager is local.

DynamicQueueName$ String. The name assigned to the dynamic queue at the time the queue is opened when the Name$ parameter specifies a model queue.

AlternateUserId$ String. The alternate user ID used to validate access when opening the queue.