ibm-information-center/dist/eclipse/plugins/i5OS.ic.cl_5.4.0.1/clrmsgq.htm

159 lines
5.6 KiB
HTML

<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><META http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Clear Message Queue (CLRMSGQ)</title>
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body bgcolor="white">
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<a name="CLRMSGQ.Top_Of_Page"></a>
<h2>Clear Message Queue (CLRMSGQ)</h2>
<table width="100%">
<tr>
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
<b>Threadsafe: </b>No
</td>
<td valign="top" align="right">
<a href="#CLRMSGQ.PARAMETERS.TABLE">Parameters</a><br>
<a href="#CLRMSGQ.COMMAND.EXAMPLES">Examples</a><br>
<a href="#CLRMSGQ.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="CLRMSGQ"></a>
<p>The Clear Message Queue (CLRMSGQ) command clears (removes) all messages from a specified message queue. Once cleared, the data can no longer be displayed or printed. If the specified message queue is not allocated to a job, it is implicitly allocated by this command for the duration of the command. If the specified message queue is *WRKSTN or a work station message queue, it is not allocated and the message queue is cleared even if the work station device description is allocated to another job.
</p>
<p><b>Restriction:</b> You must have change (*CHANGE) authority to the message queue and use (*USE) authority to the library where the message queue is stored.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#CLRMSGQ.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="CLRMSGQ.PARAMETERS.TABLE">Parameters</a></h3>
<table border="1" cellpadding="4" cellspacing="0">
<!-- col1="10" col2="15" col3="30" col4="10" -->
<tr>
<th bgcolor="aqua" valign="bottom" align="left">Keyword</th>
<th bgcolor="aqua" valign="bottom" align="left">Description</th>
<th bgcolor="aqua" valign="bottom" align="left">Choices</th>
<th bgcolor="aqua" valign="bottom" align="left">Notes</th>
</tr>
<tr>
<td valign="top" rowspan="3"><a href="#CLRMSGQ.MSGQ"><b>MSGQ</b></a></td>
<td valign="top">Message queue</td>
<td valign="top"><i>Qualified object name</i></td>
<td valign="top" rowspan="3">Required, Positional 1</td>
</tr>
<tr>
<td valign="top">Qualifier 1: Message queue</td>
<td valign="top"><i>Name</i>, *WRKSTN</td>
</tr><tr>
<td valign="top">Qualifier 2: Library</td>
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
</tr><tr>
<td valign="top"><a href="#CLRMSGQ.CLEAR"><b>CLEAR</b></a></td>
<td valign="top">Clear</td>
<td valign="top"><b><u>*ALL</u></b>, *KEEPUNANS</td>
<td valign="top">Optional</td>
</tr>
</table>
<table width="100%">
<tr><td align="right"><a href="#CLRMSGQ.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="CLRMSGQ.MSGQ"></a>
<h3>Message queue (MSGQ)</h3>
<p>Specifies the message queue to be cleared. If a specific message queue name is specified with a library qualifier of *LIBL, only the first message queue found with that name is cleared.
</p>
<p>This is a required parameter.
</p>
<p><b>Qualifier 1: Message queue</b>
</p>
<dl>
<dt><b>*WRKSTN</b></dt>
<dd>The work station message queue is cleared. This is not allowed in batch mode.
</dd>
<dt><b><i>message-queue-name</i></b></dt>
<dd>Specify the name of the message queue to be cleared.
</dd>
</dl>
<p><b>Qualifier 2: Library</b>
</p>
<dl>
<dt><b><u>*LIBL</u></b></dt>
<dd>All libraries in the library list for the current thread are searched until the first match is found.
</dd>
</dl>
<dl>
<dt><b>*CURLIB</b></dt>
<dd>The current library for the thread is searched to locate the message queue to be cleared. If no current library exists in the library list, the QGPL library is used.
</dd>
<dt><b><i>library-name</i></b></dt>
<dd>Specify a library name where the message queue is located. Only the library named in this parameter is searched.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CLRMSGQ.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CLRMSGQ.CLEAR"></a>
<h3>Clear (CLEAR)</h3>
<p>Specifies which messages to clear from the message queue.
</p>
<dl>
<dt><b><u>*ALL</u></b></dt>
<dd>Clears all messages on the message queue. If there are any unanswered messages on the queue, the default reply for the message is sent before the message is removed.
</dd>
<dt><b>*KEEPUNANS</b></dt>
<dd>All messages except unanswered inquiry messages and sender copy messages are removed from the specified message queue.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CLRMSGQ.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="CLRMSGQ.COMMAND.EXAMPLES">Examples</a> </h3>
<p><b>Example 1: Clearing All Messages</b>
</p>
<p>
<pre>
CLRMSGQ MSGQ(*CURLIB/MQFIN) CLEAR(*ALL)
</pre>
</p>
<p>This command clears all messages from a message queue named MQFIN, which is located in the current library for the job.
</p>
<p><b>Example 2: Keeping Unanswered Messages</b>
</p>
<p>
<pre>
CLRMSGQ MSGQ(*CURLIB/MQFIN) CLEAR(*KEEPUNANS)
</pre>
</p>
<p>This command clears all messages except unanswered inquiry messages from a message queue called MQFIN, which is located in the current library for the job.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#CLRMSGQ.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="CLRMSGQ.ERROR.MESSAGES">Error messages</a> </h3>
<p><b><u>*ESCAPE Messages</u></b>
</p>
<dl>
<dt><b>CPF2357</b></dt>
<dd>Message queue &amp;1 in &amp;2 not cleared.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CLRMSGQ.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>