C 示例关闭队列

此示例演示如何使用 MQCLOSE 调用来关闭队列。

本节摘自浏览示例应用程序。 [z/OS] 对于 IBM® MQ for z/OS® 这是程序 CSQ4BCA1.

有关示例应用程序的名称和位置,请参阅以下主题:
⋮
   /*                                                    */
   /*   Close the queue.                                 */
   /*   Test the output of the close call.  If the call  */
   /*   fails, print an error message showing the        */
   /*   completion code and reason code.                 */
   /*                                                    */
   MQCLOSE(Hconn,
           &Hobj,
           MQCO_NONE,
           &CompCode,
           &Reason);
   if ((CompCode != MQCC_OK) || (Reason != MQRC_NONE))
      {
      sprintf(pBuff, MESSAGE_4_E,
              ERROR_IN_MQCLOSE, CompCode, Reason);
      PrintLine(pBuff);
      RetCode = CSQ4_ERROR;
      }
⋮