OPTS (10-digit signed integer) - input

Options that control the action of MQOPEN.

At least one of the following options must be specified:

See below for details of these options; other options can be specified as required. If more than one option is required, the values can be added together (do not add the same constant more than once). Combinations that are not valid are noted; all other combinations are valid. Only options that are applicable to the type of object specified by OBJDSC are allowed (see Table 54).

Access options: The following options control the type of operations that can be performed on the object:

OOINPQ

Open queue to get messages using queue-defined default.

The queue is opened for use with subsequent MQGET calls. The type of access is either shared or exclusive, depending on the value of the DefInputOpenOption queue attribute; see Attributes for queues for details.

This option is valid only for local, alias, and model queues; it is not valid for remote queues, distribution lists, and objects that are not queues.

OOINPS

Open queue to get messages with shared access.

The queue is opened for use with subsequent MQGET calls. The call can succeed if the queue is currently open by this or another application with OOINPS, but fails with reason code RC2042 if the queue is currently open with OOINPX.

This option is valid only for local, alias, and model queues; it is not valid for remote queues, distribution lists, and objects that are not queues.

OOINPX

Open queue to get messages with exclusive access.

The queue is opened for use with subsequent MQGET calls. The call fails with reason code RC2042 if the queue is currently open by this or another application for input of any type (OOINPS or OOINPX).

This option is valid only for local, alias, and model queues; it is not valid for remote queues, distribution lists, and objects that are not queues.

The following notes apply to these options:

OOBRW

Open queue to browse messages.

The queue is opened for use with subsequent MQGET calls with one of the following options:

  • GMBRWF

  • GMBRWN

  • GMBRWC

This is allowed even if the queue is currently open for OOINPX. An MQOPEN call with the OOBRW option establishes a browse cursor, and positions it logically before the first message on the queue; see the GMOPT field described in MQGMO - Get-message options for further information.

This option is valid only for local, alias, and model queues; it is not valid for remote queues, distribution lists, and objects which are not queues. It is also not valid if ODMN is the name of a queue manager alias; this is true even if the value of the RemoteQMgrName attribute in the local definition of a remote queue used for queue manager aliasing is the name of the local queue manager.

OOOUT

Open queue to put messages.

The queue is opened for use with subsequent MQPUT calls.

An MQOPEN call with this option can succeed even if the InhibitPut queue attribute is set to QAPUTI (although subsequent MQPUT calls will fail while the attribute is set to this value).

This option is valid for all types of queue, including distribution lists.

OOINQ

Open object to inquire attributes.

The queue, namelist, process definition, or queue manager is opened for use with subsequent MQINQ calls.

This option is valid for all types of object other than distribution lists. It is not valid if ODMN is the name of a queue manager alias; this is true even if the value of the RemoteQMgrName attribute in the local definition of a remote queue used for queue manager aliasing is the name of the local queue manager.

OOSET

Open queue to set attributes.

The queue is opened for use with subsequent MQSET calls.

This option is valid for all types of queue other than distribution lists. It is not valid if ODMN is the name of a local definition of a remote queue; this is true even if the value of the RemoteQMgrName attribute in the local definition of a remote queue used for queue manager aliasing is the name of the local queue manager.

Binding options: The following options apply when the object being opened is a cluster queue; these options control the binding of the queue handle to a particular instance of the cluster queue:

OOBNDO

Bind handle to destination when queue is opened.

This causes the local queue manager to bind the queue handle to a particular instance of the destination queue when the queue is opened. As a result, all messages put using this handle are sent to the same instance of the destination queue, and by the same route.

This option is valid only for queues, and affects only cluster queues. If specified for a queue that is not a cluster queue, the option is ignored.

OOBNDN

Do not bind to a specific destination.

This stops the local queue manager binding the queue handle to a particular instance of the destination queue. As a result, successive MQPUT calls using this handle may result in the messages being sent to different instances of the destination queue, or being sent to the same instance but by different routes. It also allows the instance selected to be changed subsequently by the local queue manager, by a remote queue manager, or by a message channel agent (MCA), according to network conditions.

Note:
Client and server applications which need to exchange a series of messages in order to complete a transaction should not use OOBNDN (or OOBNDQ when DefBind has the value BNDNOT), because successive messages in the series may be sent to different instances of the server application.

If OOBRW or one of the OOINP* options is specified for a cluster queue, the queue manager is forced to select the local instance of the cluster queue. As a result, the binding of the queue handle is fixed, even if OOBNDN is specified.

If OOINQ is specified with OOBNDN, successive MQINQ calls using that handle may inquire different instances of the cluster queue, although usually all of the instances have the same attribute values.

OOBNDN is valid only for queues, and affects only cluster queues. If specified for a queue that is not a cluster queue, the option is ignored.

OOBNDQ

Use default binding for queue.

This causes the local queue manager to bind the queue handle in the way defined by the DefBind queue attribute. The value of this attribute is either BNDOPN or BNDNOT.

OOBNDQ is the default if neither OOBNDO nor OOBNDN is specified.

OOBNDQ is defined to aid program documentation. It is not intended that this option be used with either of the other two bind options, but because its value is zero such use cannot be detected.

Context options: The following options control the processing of message context:

OOSAVA

Save context when message retrieved.

Context information is associated with this queue handle. This information is set from the context of any message retrieved using this handle. For more information on message context, see the WebSphere MQ Application Programming Guide.

This context information can be passed to a message that is subsequently put on a queue using the MQPUT or MQPUT1 calls. See the PMPASI and PMPASA options described in MQPMO - Put-message options.

Until a message has been successfully retrieved, context cannot be passed to a message being put on a queue.

A message retrieved using one of the GMBRW* browse options does not have its context information saved (although the context fields in the MSGDSC parameter are set after a browse).

This option is valid only for local, alias, and model queues; it is not valid for remote queues, distribution lists, and objects which are not queues. One of the OOINP* options must be specified.

OOPASI

Allow identity context to be passed.

This allows the PMPASI option to be specified in the PMO parameter when a message is put on a queue; this gives the message the identity context information from an input queue that was opened with the OOSAVA option. For more information on message context, see the WebSphere MQ Application Programming Guide.

The OOOUT option must be specified.

This option is valid for all types of queue, including distribution lists.

OOPASA

Allow all context to be passed.

This allows the PMPASA option to be specified in the PMO parameter when a message is put on a queue; this gives the message the identity and origin context information from an input queue that was opened with the OOSAVA option. For more information on message context, see the WebSphere MQ Application Programming Guide.

This option implies OOPASI, which need not therefore be specified. The OOOUT option must be specified.

This option is valid for all types of queue, including distribution lists.

OOSETI

Allow identity context to be set.

This allows the PMSETI option to be specified in the PMO parameter when a message is put on a queue; this gives the message the identity context information contained in the MSGDSC parameter specified on the MQPUT or MQPUT1 call. For more information on message context, see the WebSphere MQ Application Programming Guide.

This option implies OOPASI, which need not therefore be specified. The OOOUT option must be specified.

This option is valid for all types of queue, including distribution lists.

OOSETA

Allow all context to be set.

This allows the PMSETA option to be specified in the PMO parameter when a message is put on a queue; this gives the message the identity and origin context information contained in the MSGDSC parameter specified on the MQPUT or MQPUT1 call. For more information on message context, see the WebSphere MQ Application Programming Guide.

This option implies the following options, which need not therefore be specified:

  • OOPASI

  • OOPASA

  • OOSETI

The OOOUT option must be specified.

This option is valid for all types of queue, including distribution lists.

Other options: The following options control authorization checking, and what happens when the queue manager is quiescing:

OOALTU

Validate with specified user identifier.

This indicates that the ODAU field in the OBJDSC parameter contains a user identifier that is to be used to validate this MQOPEN call. The call can succeed only if this ODAU is authorized to open the object with the specified access options, regardless of whether the user identifier under which the application is running is authorized to do so. This does not apply to any context options specified, however, which are always checked against the user identifier under which the application is running.

This option is valid for all types of object.

OOFIQ

Fail if queue manager is quiescing.

This option forces the MQOPEN call to fail if the queue manager is in quiescing state.

This option is valid for all types of object.

MQOO_RESOLVE_LOCAL_QUEUE

Fills in the name of local queue that was opened.

This option specifies that the ResolvedQName in the MQOD structure (if available) should be filled in with the name of the local queue which was actually opened. The ResolvedQMgrName will similarly be filled in with the name of the local queue manager hosting the local queue.

Table 54. Valid MQOPEN options for each queue type
Option Alias
(note 1)
Local and Model Remote Nonlocal Cluster Distribution list
OOINPQ Y Y -- -- --
OOINPS Y Y -- -- --
OOINPX Y Y -- -- --
OOBRW Y Y -- -- --
OOOUT Y Y Y Y Y
OOINQ Y Y Note 2 Y --
OOSET Y Y Note 2 -- --
OOBNDO (note 3) Y Y Y Y Y
OOBNDN (note 3) Y Y Y Y Y
OOBNDQ (note 3) Y Y Y Y Y
OOSAVA Y Y -- -- --
OOPASI Y Y Y Y Y
OOPASA Y Y Y Y Y
OOSETI Y Y Y Y Y
OOSETA Y Y Y Y Y
OOALTU Y Y Y Y Y
OOFIQ Y Y Y Y Y
Notes:

  1. The validity of options for aliases depends on the validity of the option for the queue to which the alias resolves.

  2. This option is valid only for the local definition of a remote queue.

  3. This option can be specified for any queue type, but is ignored if the queue is not a cluster queue.