To close an object, you use the MQCLOSE call. If the object is a queue, you should note the following:
When you close a temporary dynamic queue, the queue is deleted, along with any messages that may still be on it. This is true even if there are uncommitted MQGET, MQPUT, or MQPUT1 calls outstanding against the queue.
Namelists can be closed only on AIX, HP-UX, OS/2, Linux, z/OS, OS/400, Solaris, Compaq Tru64 UNIX, and Windows systems.
In MQSeries for VSE/ESA, ensure that your application issues a matching MQCLOSE call for each MQOPEN call. If your application does not issue the MQCLOSE call, the MQSeries for VSE/ESA housekeeping routine issues the MQCLOSE call on its behalf and unwanted messages appear in the SYSTEM.LOG queue.
Closure is unrelated to syncpoint, so you can close queues before or after syncpoint.
As input to the MQCLOSE call, you must supply:
The output from MQCLOSE is:
Descriptions of the parameters of the MQCLOSE call are given in WebSphere MQ Application Programming Reference.