MQGetMessageOptions class

This class encapsulates the various options that control the action of getting a message from an WebSphere MQ queue.

Containment

Contained by the MQSession class.

Properties

Methods

Creation

New creates a new MQGetMessageOptions object and sets all its properties to initial values.

Alternatively, use the AccessGetMessageOptions method of the MQSession class.

Syntax:

Dim gmo As New MQGetMessageOptions or

Set gmo = New MQGetMessageOptions

CompletionCode property

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

Defined in: MQGetMessageOptions Class.

Data Type: Long

Values:

Syntax:
To get: completioncode& = GetOpts.CompletionCode

MatchOptions property

Read-write. Options controlling selection criteria used for MQGET. The initial value is MQMO_MATCH_MSG_ID + MQMO_MATCH_CORREL_ID.

Defined in:
MQGetMessageOptions class

Data Type:
Long

Values:
See the WebSphere MQ Application Programming Reference

Syntax:
To get: matchoptions& = GetOpts.MatchOptions

To set: GetOpts.MatchOptions =matchoptions&

Options property

Read-write. The MQGMO Options field. See the WebSphere MQ Application Programming Reference for details. Initial value is MQGMO_NO_WAIT.

Defined in: MQGetMessageOptions Class.

Data Type: Long

Syntax:
To get: options& = GetOpts.Options
To set: GetOpts.Options = options&

ReasonCode property

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

Defined in: MQGetMessageOptions class

Data Type: Long

Values:

Syntax:
To get: reasoncode& = GetOpts.ReasonCode

ReasonName property

Read-only. Returns the symbolic name of the latest reason code. For example, "MQRC_QMGR_NOT_AVAILABLE".
Defined in: MQGetMessageOptions class

Data Type: String

Values:

Syntax:
To get: reasonname$ = MQGetMessageOptions.ReasonName

ResolvedQueueName property

Read-only. The MQGMO ResolvedQName field. See the WebSphere MQ Application Programming Reference for details. The initial value is all blanks.

Defined in: MQGetMessageOptions class

Data Type: String of 48 characters

Syntax:
To get: qname$ = GetOpts.ResolvedQueueName

WaitInterval property

Read-write. The MQGMO WaitInterval field. The maximum time, in milliseconds, that the Get will wait for a suitable message to arrive - if wait action has been requested by the Options property. See the WebSphere MQ Application Programming Reference for details. Initial value is 0.

Defined in: MQGetMessageOptions class

Data Type: Long

Syntax:
To get: wait& = GetOpts.WaitInterval

To set: GetOpts.WaitInterval = wait&

ClearErrorCodes method

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

Defined in: MQGetMessageOptions class

Syntax:
Call GetOpts.ClearErrorCodes()



© IBM Corporation 2002. All Rights Reserved