This class represents a connection to a queue manager. The queue manager may be running locally (a WebSphere MQ server) or remotely with access provided by the WebSphere MQ client. An application must create an object of this class and connect it to a queue manager. When an object of this class is destroyed it is automatically disconnected from its queue manager.
MQQueue class objects are associated with this class.
New creates a new MQQueueManager object and sets all the properties to initial values. Alternatively use the AccessQueueManager method of the MQSession class.
Dim mgr As New MQQueueManager
set mgr = New MQQueueManager
The following properties can be accessed at any time
The remaining properties can be accessed only if the object is connected to a queue manager, and the user ID is authorized to inquire against that queue manager. If an alternate user ID is set and the current user ID is authorized to use it, the alternate user ID is checked for authorization for inquire instead.
If these conditions do not apply, WebSphere MQ Automation Classes for ActiveX attempts to connect to the queue manager and open it for inquire automatically. If this is unsuccessful, the call sets a CompletionCode of MQCC_FAILED and one of the following ReasonCodes:
The Backout, Begin, Commit, Connect, and Disconnect methods set errors matching those set by the MQI calls MQBACK, MQBEGIN, MQCMIT, MQCONN, and MQDISC respectively.
Read-write. The alternate user ID to be used to validate access to the queue manager attributes.
This property should not be set if IsConnected is TRUE.
This property cannot be set whilst the object is open.
Defined in: MQQueueManager class
Data Type: String of 12 characters
Syntax:
To get: altuser$ =
MQQueueManager.AlternateUserId
To set: MQQueueManager.AlternateUserId =
altuser$
Read-only. The MQI AuthorityEvent attribute.
Syntax:
To get: authevent =
MQQueueManager.AuthorityEvent
Read-write. These are the options that apply to the Begin
method.
Initially MQBO_NONE.
Syntax:
To get:
beginoptions&=MQQueueManager.BeginOptions
To set: MQQueueManager.BeginOptions=beginoptions&
Read-only. This controls whether automatic channel definition is permitted.
Syntax:
To get: channelautodef&=
MQQueueManager.ChannelAutoDefinition
Read-only. This controls whether automatic channel definition events are generated.
Syntax:
To get:
channelautodefevent&=MQQueueManager.ChannelAutoDefinitionEvent
Read-only. The name of the user exit used for automatic channel definition.
Syntax:
To get: channelautodefexit$=
MQQueueManager.ChannelAutoDefinitionExit
Read-only. The MQI CodedCharSetId attribute.
Defined in: MQQueueManager class
Data Type: Long
Syntax:
To get: characterset&=
MQQueueManager.CharacterSet
Read-write. Options used to control what happens when the queue manger is closed. The initial value is MQCO_NONE.
Syntax:
To get: closeopt& =
MQQueueManager.CloseOptions
To set: MQQueueManager.CloseOptions =closeopt&
Read-only. The MQI CommandInputQName attribute.
Defined in: MQQueueManager class
Data Type: String of 48 characters
Syntax:
To get: commandinputqname$ =
MQQueueManager.CommandInputQueueName
Read-only. Returns the version and level of the WebSphere MQ queue manager implementation (MQI CommandLevel attribute)
Defined in: MQQueueManager class
Data Type: Long
Syntax:
To get: level& =
MQQueueManager.CommandLevel
Read-only. Returns the completion code set by the last method or property access issued against the object.
Defined in: MQQueueManager class
Data Type: Long
Values:
Syntax:
To get: completioncode& =
MQQueueManager.CompletionCode
Read-only. The connection handle for the WebSphere MQ queue manager object.
Syntax:
To get: hconn& =
MQQueueManager.ConnectionHandle
Read-only. Indicates if the object is connected to its queue manager or not.
Defined in: MQQueueManager class
Data Type: Boolean
Values:
Syntax:
To get: status =
MQQueueManager.ConnectionStatus
Read-Write. These options apply to the Connect method. Initially MQCNO_NONE.
Syntax:
To get:
connectoptions&=MQQueueManager.ConnectOptions
To set: MQQueueManager.ConnectOptions=connectoptions&
Read-only. The MQI DeadLetterQName attribute.
Defined in: MQQueueManager class
Data Type: String of 48 characters
Syntax:
to get: dlqname$ =
MQQueueManager.DeadLetterQueueName
Read-only. The MQI DefXmitQName attribute.
Defined in: MQQueueManager class
Data Type: String of 48 characters
Syntax:
To get: defxmitqname$ =
MQQueueManager.DefaultTransmissionQueueName
Read-only. The MQI QMgrDesc attribute.
Defined in: MQQueueManager class
Data Type: String of 64 characters
Syntax:
To get: description$ =
MQQueueManager.Description
Read-Only. This is the capability of the queue manager to support distribution lists.
Syntax:
To get: distributionlists=
MQQueueManager.DistributionLists
Read-only. The MQI InhibitEvent attribute.
Defined in: MQQueueManager class
Data Type: Long
Values:
Syntax:
To get: inhibevent& =
MQQueueManager.InhibitEvent
Read-only. A value that indicates whether or not the queue manager is currently connected.
Defined in: MQQueueManager class
Data Type: Boolean
Values:
Syntax:
To get: isconnected =
MQQueueManager.IsConnected
Read-only. A value that indicates whether or not the queue manager is currently open for inquire.
Syntax:
To get: IsOpen = MQQueueManager.IsOpen
Read-only. The MQI LocalEvent attribute.
Defined in: MQQueueManager class
Data Type: Long
Values:
Syntax:
To get: localevent& =
MQQueueManager.LocalEvent
Read-only. The MQI MaxHandles attribute.
Defined in: MQQueueManager class
Data Type: Long
Syntax:
To get: maxhandles& =
MQQueueManager.MaximumHandles
Read-only. The MQI MaxMsgLength Queue Manager attribute.
Defined in: MQQueueManager class
Data Type: Long
Syntax:
To get: maxmessagelength& =
MQQueueManager.MaximumMessageLength
Read-only. The MQI MaxPriority attribute.
Defined in: MQQueueManager class
Data Type: Long
Syntax:
To get: maxpriority& =
MQQueueManager.MaximumPriority
Read-only. The MQI MaxUncommittedMsgs attribute.
Defined in: MQQueueManager class
Data Type: Long
Syntax:
To get: maxuncommitted& =
MQQueueManager.MaximumUncommittedMessages
Read-write. The MQI QMgrName attribute. This property cannot be written once the MQQueueManager is connected.
Defined in: MQQueueManager class
Data Type: String of 48 characters
Syntax:
To get: name$ = MQQueueManager.name
To set: MQQueueManager.name = name$
Read-only. The object handle for the WebSphere MQ queue manager object.
Syntax:
To get: hobj& =
MQQueueManager.ObjectHandle
Read-only. The MQI PerformanceEvent attribute.
Defined in: MQQueueManager class
Data Type: Long
Values:
Syntax:
To get: perfevent& =
MQQueueManager.PerformanceEvent
Read-only. The MQI Platform attribute.
Defined in: MQQueueManager class
Data Type: Long
Values:
Syntax:
To get: platform& =
MQQueueManager.Platform
Read-only. Returns the reason code set by the last method or property access issued against the object.
Defined in: MQQueueManager class
Data Type: Long
Values:
Syntax:
To get: reasoncode& =
MQQueueManager.ReasonCode
Read-only. Returns the symbolic name of the latest reason code. For example, "MQRC_QMGR_NOT_AVAILABLE".
Defined in: MQQueueManager class
Data Type: String
Values:
Syntax:
To get: reasonname$ =
MQQueueManager.ReasonName
Read-only. The MQI RemoteEvent attribute.
Defined in: MQQueueManager class
Data Type: Long
Values:
Syntax:
To get: remoteevent& =
MQQueueManager.RemoteEvent
Read-only. The MQI StartStopEvent attribute.
Defined in: MQQueueManager class
Data Type: Long
Values:
Syntax:
To get: strstpevent& =
MQQueueManager.StartStopEvent
Read-only. The MQI SyncPoint attribute.
Defined in: MQQueueManager class
Data Type: Long
Values:
Syntax:
To get: syncpointavailability& =
MQQueueManager.SyncPointAvailability
Read-only. The MQI TriggerInterval attribute.
Defined in: MQQueueManager class
Data Type: Long
Syntax:
To get: trigint& =
MQQueueManager.TriggerInterval
Creates a new MQQueue object and associates it with this MQQueueManager object by setting the queue's connection reference property. 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 object's ReasonCode and CompletionCode are set, and the MQSession ReasonCode and CompletionCode 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, it should be set 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. See the WebSphere MQ Application Programming Guide for more information on remote queue name resolution and queue manager aliasing.
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 the WebSphere MQ Application Programming Guide for more information on naming dynamic queues.
MQQueueManager class.
set queue = MQQueueManager.AccessQueue(Name$, OpenOptions&,QueueManagerName$, DynamicQueueName$, AlternateUserId$)
Name$
String. Name of WebSphere MQ queue.
OpenOptions:
Long. Options to be used when queue is opened. See the WebSphere MQ Application Programming Reference.
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.
Creates a new MQDistributionList object and sets its connection reference to the owning queue manager.
Syntax:
set distributionlist =
MQQueueManager.AddDistributionList
Backs out any uncommitted message puts and gets that have occurred as part of a unit of work since the last syncpoint.
Defined in: MQQueueManager class
Syntax:
Call MQQueueManager.Backout()
Begins a unit of work that is coordinated by the queue manager. The begin options affect the behavior of this method.
Syntax:
Call MQQueueManager.Begin()
Resets the CompletionCode to MQCC_OK and the ReasonCode to MQRC_NONE for both the MQQueueManager class and the MQSession class.
Defined in: MQQueueManager class
Syntax:
Call MQQueueManager.ClearErrorCodes()
Commits any message puts and gets that have occurred as part of a unit of work since the last syncpoint.
Defined in: MQQueueManager class
Syntax:
Call MQQueueManager.Commit()
Connects the MQQueueManager object to a real queue manager via the WebSphere MQ client or server. As well as performing a connect, this method also performs an open for queries to be made against the queue manager object.
Sets IsConnected to TRUE.
A maximum of one MQQueueManager object per ActiveX instance is allowed to connect to a queue manager.
Defined in: MQQueueManager class
Syntax:
Call MQQueueManager.Connect()
Disconnects the MQQueueManager object from the queue manager.
Sets IsConnected to FALSE.
All Queue objects associated with the MQQueueManager object are made unusable and cannot be re-opened.
Any uncommitted changes (message puts and gets) are committed.
Defined in: MQQueueManager class
Syntax:
Call MQQueueManager.Disconnect()