Clear MQ Queue (CLRMQMQ)

    Where allowed to run
    All environments (*ALL)

    Threadsafe
    Yes

The Clear MQ Queue (CLRMQMQ) command deletes all of the messages from a local queue.

The command fails if the queue contains uncommitted messages, or if an application has the queue open.


Parameters

Keyword Description Choices Notes
QNAME Queue name Character value Required, Positional 1
MQMNAME Message Queue Manager name Character value, *DFT Optional, Positional 2


Queue name (QNAME)

>

The name of the queue to be cleared.

The possible values are:

    queue-name
    Specify the name of the queue.


Message Queue Manager name (MQMNAME)

>

Specifies the name of the message queue manager.

The possible values are:


Examples

>

None


Error messages

>

Unknown

Parent topic: CL commands reference for IBM i