MQDLTMH - Delete message handle

The MQDLTMH call deletes a message handle and is the inverse of the MQCRTMH call.


Syntax

MQDLTMH (Hconn, Hmsg, DltMsgHOpts, CompCode, Reason)


Parameters

    Hconn
    Type: MQHCONN - input

    This handle represents the connection to the queue manager.

    The value must match the connection handle that was used to create the message handle specified in the Hmsg parameter.

    If the message handle was created using MQHC_UNASSOCIATED_HCONN then a valid connection must be established on the thread deleting the message handle, otherwise the call fails with MQRC_CONNECTION_BROKEN.

    Hmsg
    Type: MQHMSG - input/output

    This is the message handle to be deleted. The value was returned by a previous MQCRTMH call.

    On successful completion of the call, the handle is set to an invalid value for the environment. This value is:

      MQHM_UNUSABLE_HMSG
      Unusable message handle.

    The message handle cannot be deleted if another IBM MQ call is in progress that was passed the same message handle.

    DltMsgHOpts
    Type: MQDMHO - input

    See MQDMHO for details.

    CompCode
    Type: MQLONG - output The completion code; it is one of the following:

      MQCC_OK
      Successful completion.

      MQCC_FAILED
      Call failed.

    Reason
    Type: MQLONG - output If CompCode is MQCC_OK:

      MQRC_NONE
      (0, X'000') No reason to report.

    If CompCode is MQCC_FAILED:

      MQRC_ADAPTER_NOT_AVAILABLE
      (2204, X'089C') Adapter not available.

      MQRC_ADAPTER_SERV_LOAD_ERROR
      (2130, X'852') Unable to load adapter service module.

      MQRC_ASID_MISMATCH
      (2157, X'86D') Primary and home ASIDs differ.

      MQRC_CALL_IN_PROGRESS
      (2219, X'08AB') MQI call entered before previous call completed.

      MQRC_CONNECTION_BROKEN
      (2009, X'07D9') Connection to queue manager lost.

      MQRC_DMHO_ERROR
      (2462, X'099E') Delete message handle options structure not valid.

      MQRC_HMSG_ERROR
      (2460, X'099C') Message handle pointer not valid.

      MQRC_MSG_HANDLE_IN_USE
      (2499, X'09C3') Message handle already in use.

      MQRC_OPTIONS_ERROR
      (2046, X'07FE') Options not valid or not consistent.

      MQRC_STORAGE_NOT_AVAILABLE
      (2071, X'817') Insufficient storage available.

      MQRC_UNEXPECTED_ERROR
      (2195, X'893') Unexpected error occurred.

    For detailed information about these codes, see Reason codes.


C invocation

MQDLTMH (Hconn, &Hmsg, &DltMsgHOpts, &CompCode, &Reason);
Declare the parameters as follows:
MQHCONN  Hconn;       /* Connection handle */
MQHMSG   Hmsg;        /* Message handle */
MQDMHO   DltMsgHOpts; /* Options that control the action of MQDLTMH */
MQLONG   CompCode;    /* Completion code */
MQLONG   Reason;      /* Reason code qualifying CompCode */


COBOL invocation

CALL 'MQDLTMH' USING HCONN, HMSG, DLTMSGOPTS, COMPCODE, REASON.
Declare the parameters as follows:
**  Connection handle
01   HCONN   PIC S9(9) BINARY.

**  Options that control the action of MQDLTMH
01   DLTMSGHOPTS.
COPY CMQDLMHOV.

**  Completion code
01  COMPCODE   PIC S9(9) BINARY.

** Reason code qualifying COMPCODE
01   REASON      PIC S9(9) BINARY.


PL/I invocation

call MQDLTMH (Hconn, Hmsg, DltMsgHOpts, CompCode, Reason);
Declare the parameters as follows:
dcl Hconn          /* Connection handle */
dcl Hmsg           /* Message handle */
dcl DltMsgHOpts like MQDMHO;    /* Options that control the action of MQDLTMH */
dcl CompCode       /* Completion code */
dcl Reason         /* Reason code qualifying CompCode */


High Level Assembler invocation

CALL MQDLTMH,(HCONN,HMSG,DLTMSGHOPTS,COMPCODE,REASON)
Declare the parameters as follows:
HCONN          DS        F  Connection handle
HMSG           DS        D  Message handle
DLTMSGHOPTS    CMQDMHOA,  Options that control the action of MQDLTMH
COMPCODE       DS        F  Completion code
REASON         DS        F  Reason code qualifying COMPCODE
Parent topic: Function calls