Clearing a local queue
We can use the CLEAR command to clear a local queue.
For example, to delete all the messages from a local queue called MAGENTA.QUEUE, use the following command:CLEAR QLOCAL (MAGENTA.QUEUE)Note: There is no prompt that enables you to change your mind; once you press the Enter key the messages are lost. We cannot clear a queue if:
- There are uncommitted messages that have been put on the queue under sync point.
- An application currently has the queue open.