Closing a queue
This example demonstrates how to use the MQCLOSE call to close a queue. This extract is taken from the Browse sample application (program CSQ4BCA1) supplied with WebSphere MQ for z/OS. For the names and locations of the sample applications on other platforms, see Sample programs (all platforms except z/OS).
⋮ /* */ /* 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; } ⋮
Parent topic:
C language examples
fg18850_