MQI OPEN


This statement opens a queue.

Command

Parameters

IMFEXEC MQI OPEN

HCONN(hconn)

HOBJ(hobj)

OOPTS(options)

The following table describes the IMFEXEC MQI OPEN parameters.

Note

The following list of constants may not be complete, because IBM may have added new constants since the printing of this manual. For a more complete list, see the IBM manual MQ Application Programming Reference. Also note that when specifying multiple options, they must be enclosed within single quotation marks. For example, OOPTS(‘MQOO_OUTPUT MQOO_SET_ALL_CONTEXT’).

Parameter

Function

Notes

HCONN

Provides the connection handle that represents the connection to the queue manager.

This parameter:

  • Specifies a variable created in an earlier CONN command
  • Is not required

If omitted, the connection handle value is the default variable IMFHCONN. The connection handle is returned by a previous IMFEXEC MQI CONN request and stored in the IMFHCONN variable or a user-specified variable. Either this parameter, specifying an existing variable that contains the connection handle, or a previously created IMFHCONN variable containing the connection handle is required.

HOBJ

Provides the object handle that represents the object being opened.

This parameter:

  • Specifies a variable to be created to contain the object handle
  • Is not required

If omitted, the object handle value is placed into the default variable IMFHOBJ. The object handle is returned by the IMFEXEC MQI OPEN request and stored in the IMFHOBJ variable or a user-specified variable.

OOPTS

Specifies the options that control the OPEN action.

This parameter is not required.

If omitted, the OPEN options value is taken from the default variable IMFMQI_OO_OPTIONS. Either the parameter or the variable is required.

Options can be specified as any valid combination of the following:

  • MQOO_BIND_NOT_FIXED
  • MQOO_BIND_ON_OPEN
  • MQOO_FAIL_IF_QUIESCING
  • MQOO_ALTERNATE_USER_AUTHORITY
  • MQOO_SET_ALL_CONTEXT
  • MQOO_SET_IDENTITY_CONTEXT
  • MQOO_PASS_ALL_CONTEXT
  • MQOO_PASS_IDENTITY_CONTEXT
  • MQOO_SAVE_ALL_CONTEXT
  • MQOO_INQUIRE
  • MQOO_OUTPUT
  • MQOO_BROWSE
  • MQOO_INPUT_EXCLUSIVE
  • MQOO_INPUT_SHARED
  • MQOO_INPUT_AS_Q_DEF
  • MQOO_BIND_AS_Q_DEF
  • MQOO_READ_AHEAD_AS_Q_DEF
  • MQOO_BIND_ON_GROUP
  • MQOO_CO_OP
  • MQOO_NO_READ_AHEAD
  • MQOO_READ_AHEAD
  • MQOO_NO_MULTICAST
  • MQOO_RESOLVE_LOCAL_Q
  • MQOO_RESOLVE_LOCAL_TOPIC

See note at the beginning of this table.

This table describes the variables used to build the object descriptor prior to issuing the OPEN statement.

Note

The following list of constants may not be complete, because IBM may have added new constants since the printing of this manual. For a more complete list, see the IBM manual MQ Application Programming Reference. Also note that when specifying multiple options, they must be enclosed within single quotation marks. For example, OOPTS(‘MQOO_OUTPUT MQOO_SET_ALL_CONTEXT’).

Variable name

Source

Notes

IMFMQI_OD_STRUCID

Input

(optional) The EXEC may or may not set this variable. If the EXEC does not set this variable, the IBM MQ default value will be used unmodified by the EXEC Manager.

IMFMQI_OD_VERSION

Input

(optional) The EXEC may or may not set this variable. If the EXEC does not set this variable, the IBM MQ default value will be used, unmodified by the EXEC Manager.

IMFMQI_OD_OBJECTTYPE

Input

(optional) The EXEC may or may not set this variable. If the EXEC does not set this variable, the IBM MQ default value will be used, unmodified by the EXEC Manager.

IMFMQI_OD_OBJECTNAME

Input

This variable contains the queue name to be opened. Up to 48 characters can be specified.

IMFMQI_OD_OBJECTQMGRNAME

Input

(optional) This variable contains the 48-character object queue manager name. The EXEC Manager does not specify any default value when this variable is not set.

IMFMQI_OD_DYNAMICQNAME

Input

(optional) This variable contains the 48-character dynamic queue name when using a model queue. The EXEC Manager does not specify any default value when this variable is not set.

IMFMQI_OD_ALTERNATEUSERID

Input

(optional) This variable contains the 12-character alternate user identifier. The EXEC Manager does not specify any default value when this variable is not set.

IMFMQI_OD_RECSPRESENT

Input

(optional) The EXEC may or may not set this variable. If the EXEC does not set this variable, the IBM MQ default value will be used, unmodified by the EXEC Manager.

IMFMQI_OD_KNOWNDESTCOUNT

Output

This variable contains 0.

IMFMQI_OD_UNKNOWNDESTCOUNT

Output

This variable contains 0.

IMFMQI_OD_INVALIDDESTCOUNT

Output

This variable contains 0.

IMFMQI_OD_OBJECTRECOFFSET

Input

This variable contains 0.

IMFMQI_OD_RESPONSERECOFFSET

Input

This variable contains 0.

IMFMQI_OD_OBJECTRECPTR

Input

This variable contains 0.

IMFMQI_OD_RESPONSERECPTR

Input

This variable contains 0.

IMFMQI_OD_ALTERNATESECURITYID

Input

This variable exists but is null.

IMFMQI_OD_RESOLVEDQNAME

Output

This variable contains blanks.

IMFMQI_OD_RESOLVEDQMGRNAME

Output

This variable contains blanks.

IMFMQI_STRUCTURES

Output

This variable contains a blank-delimited list of the IBM MQ structures used for this statement. For this statement, the variable contains ‘OD’.

IMFMQI_OFFSETS

Output

This variable contains the value ‘NONE NONE’. The variable is provided for consistency with other IMFEXEC MQI statements that use this variable and is not of significant use for the IMFEXEC MQI OPEN statement.

The completion code is returned in the IMFMQCC and IMFCC variables. For additional information, see How-completion-and-reason-codes-are-returned.

The reason code is returned in the IMFMQRC and IMFRC variables; contents of both variables are the same. Refer to the IBM manual MQ Application Programming Reference for the reason code description.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*