CL Command Reference - DLTMSGQ
CL Command List > DLTMSGQ Reference
Description:
The Delete Message Queue (DLTMSGQ) command deletes the specified message queues and any messages in those message queues. Any message in the queue that requires a reply is answered with the default reply supplied by that message. If the message queue is being used by another job, the message queue cannot be deleted.
Restrictions:
1. You must have use (*USE), object existence (*OBJEXIST), and delete (*DLT) authority for the message queue.
2. You must have read (*READ) authority for the library in which the message queue is located.
3. The system operator message queue (QSYSOPR) and work station message queues cannot be deleted.
Examples:
DLTMSGQ MSGQ(JONES)
This command deletes the message queue named JONES. Messages stored in the JONES queue are also removed. The library list is used to find the message queue.