[z/OS]

C 示例:断开队列管理器的连接

此示例演示如何使用 MQDISC 调用将程序与 z/OS® 批处理中的队列管理器断开连接。

本代码摘录中使用的变量是在 C 示例中设置的变量:连接队列管理器。 本节摘录自浏览示例应用程序(程序 CSQ4BCA1 )。

有关示例应用程序的名称和位置,请参阅 使用 z/OS 的示例程序。

⋮
   /*                                                    */
   /*   Disconnect from the queue manager.  Test the     */
   /*   output of the disconnect call.  If the call      */
   /*   fails, print an error message showing the        */
   /*   completion code and reason code.                 */
   /*                                                    */
   MQDISC(&Hconn,
          &CompCode,
          &Reason);
   if ((CompCode != MQCC_OK) || (Reason != MQRC_NONE))
      {
      sprintf(pBuff, MESSAGE_4_E,
              ERROR_IN_MQDISC, CompCode, Reason);
      PrintLine(pBuff);
      RetCode = CSQ4_ERROR;
      }
⋮