CLEAR QLOCAL

Use the MQSC command CLEAR QLOCAL to clear the messages from a local queue.

Synonym: CLEAR QL

CLEAR QLOCAL

Read syntax diagramSkip visual syntax diagramCLEAR QLOCAL( q-name)CMDSCOPE(' ')CMDSCOPE(qmgr-name)CMDSCOPE(*)1QSGDISP(PRIVATE)QSGDISP(SHARED)1
Notes:
  • 1 Valid only on z/OS®.

Parameter descriptions for CLEAR QLOCAL

You must specify which local queue you want to clear.

The command fails if either:
  • The queue has uncommitted messages that have been put on the queue under syncpoint
  • The queue is currently open by an application (with any open options)
If an application has this queue open, or has a queue open that eventually resolves to this queue, the command fails. The command also fails if this queue is a transmission queue, and any queue that is, or resolves to, a remote queue that references this transmission queue, is open.
(q-name)
The name of the local queue to be cleared. The name must be defined to the local queue manager.
CMDSCOPE
This parameter applies to z/OS only and specifies how the command is executed when the queue manager is a member of a queue-sharing group.
CMDSCOPE must be blank, or the local queue manager, if QSGDISP is set to SHARED.
' '
The command is executed on the queue manager on which it was entered. This is the default value.
qmgr-name
The command is executed on the queue manager you specify, providing the queue manager is active within the queue-sharing group.

You can specify a queue manager name, other than the queue manager on which the command was entered, only if you are using a queue-sharing group environment and if the command server is enabled.

*
The command is executed on the local queue manager and is also passed to every active queue manager in the queue-sharing group. The effect of this is the same as entering the command on every queue manager in the queue-sharing group.
QSGDISP
Specifies whether the queue definition is shared. This parameter applies to z/OS only.
PRIVATE
Clear only the private queue named q-name. The queue is private if it was defined using a command that had the parameters QSGDISP(COPY) or QSGDISP(QMGR). This is the default value.
SHARED
Clear only the shared queue named q-name. The queue is shared if it was defined using a command that had the parameters QSGDISP(SHARED).