MQI CLOSE


This statement closes a previously opened queue.

Command

Parameters

IMFEXEC MQI CLOSE

HCONN(hconn)

HOBJ(hobj)

COPTS(options)

The following table describes the IMFEXEC MQI CLOSE parameters.

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.

HOBJ

Provides the object handle that represents the object being closed.

This parameter:

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

If omitted:

  • The object handle value is taken from the default variable IMFHOBJ.
  • The object handle is returned by a previous IMFEXEC MQI OPEN request and stored in the IMFHOBJ variable or a user-specified variable.

COPTS

Specifies the options that control the action of CLOSE.

This parameter is not required.

If omitted, the close options value is taken from the default variable IMFMQI_CO_OPTIONS.

If IMFMQI_CO_OPTIONS is not set, the default option of MQCO_NONE is used.

Valid close options:

  • MQCO_NONE
  • MQCO_DELETE
  • MQCO_DELETE_PURGE

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.

IMFMQI_REASON contains the constant (character) reason code. Refer to the IBM manual MQ Application Programming Reference or the IBM Knowledge Center for the reason code description.

 

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