93 lines
6.3 KiB
HTML
93 lines
6.3 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="task" />
|
|
<meta name="DC.Title" content="Remove messages from a message queue" />
|
|
<meta name="abstract" content="Messages are held on a message queue until they are removed" />
|
|
<meta name="description" content="Messages are held on a message queue until they are removed" />
|
|
<meta name="DC.subject" content="message, removing, from message queue, message from message queue, queue, removing message from, RMVMSG (Remove Message) command, Remove Message (RMVMSG) command, command, CL, RMVMSG (Remove Message), Remove Message (RMVMSG), SNDRPY (Send Reply) command, Send Reply (SNDRPY) command, SNDRPY (Send Reply), Send Reply (SNDRPY), reply, sending" />
|
|
<meta name="keywords" content="message, removing, from message queue, message from message queue, queue, removing message from, RMVMSG (Remove Message) command, Remove Message (RMVMSG) command, command, CL, RMVMSG (Remove Message), Remove Message (RMVMSG), SNDRPY (Send Reply) command, Send Reply (SNDRPY) command, SNDRPY (Send Reply), Send Reply (SNDRPY), reply, sending" />
|
|
<meta name="DC.Relation" scheme="URI" content="wmsgs.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rmclp.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="msgmq" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>Remove messages from a message queue</title>
|
|
</head>
|
|
<body id="msgmq"><a name="msgmq"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Remove messages from a message queue</h1>
|
|
<div><p>Messages are held on a message queue until they are removed</p>
|
|
<div class="section"> <p>You can remove them using the <span class="cmdname">Remove Message (RMVMSG)</span> command, <span class="cmdname">Clear
|
|
Message Queue (CLRMSGQ)</span> command, the RMV parameter on the <span class="cmdname">Retrieve
|
|
Message (RTVMSG)</span> and <span class="cmdname">Send Reply (SNDRPY)</span> commands,
|
|
the remove function keys of the Display Messages display, or the clear message
|
|
queue option on the Work with Message Queue display. You can remove: </p>
|
|
<ul><li>A single message</li>
|
|
<li>All messages</li>
|
|
<li>All except unanswered messages</li>
|
|
<li>All old messages</li>
|
|
<li>All new messages</li>
|
|
<li>All messages from all inactive programs</li>
|
|
</ul>
|
|
<p>To remove a single message using the <span class="cmdname">Remove Message (RMVMSG)</span> command
|
|
or a single old message using the <span class="cmdname">Retrieve Message (RTVMSG)</span> command,
|
|
you specify the message reference key of the message to be removed. </p>
|
|
<div class="p">If
|
|
you remove an inquiry message that you have not answered, a default repl<div class="note"><span class="notetitle">Note:</span> The
|
|
message reference key can also be used to receive a message and to reply to
|
|
a message.</div>
|
|
y is sent to the sender of the message and the inquiry message
|
|
and the message and its reply are removed. If you remove an inquiry message
|
|
that you have already answered, both the message and its reply are removed.</div>
|
|
<p>To
|
|
remove all messages for all inactive programs and procedures from a user's
|
|
job message queue, specify *ALLINACT for the PGMQ parameter and *ALL for the
|
|
CLEAR parameter on the <span class="cmdname">Remove Message (RMVMSG)</span> command.
|
|
If you want to print your job log before you remove all the inactive messages,
|
|
use the <span class="cmdname">Display Job Log (DSPJOBLOG)</span> command and specify
|
|
*PRINT for the OUTPUT parameter.</p>
|
|
<p>When working with a call message queue
|
|
of an ILE procedure, it is possible that an exception message for unhandled
|
|
exceptions is on the queue at the time the <span class="cmdname">Remove Message (RMVMSG)</span> command
|
|
is run. The RMVEXCP keyword of this command can be used to control actions
|
|
for messages of this type. If *YES is specified for this keyword, the RMVMSG
|
|
command causes the exception to be handled and the message to be removed.
|
|
If *NO is specified, the message is not removed. As a result, the exception
|
|
is not handled.</p>
|
|
<p>The following <span class="cmdname">Remove Message (RMVMSG)</span> command
|
|
removes a message from the user message queue JONES. The message reference
|
|
key is in the CL variable &MRKEY. </p>
|
|
<pre>DCL &MRKEY TYPE(*CHAR) LEN(4)
|
|
RCVMSG MSGQ(JONES) RMV(*NO) KEYVAR(&MRKEY)
|
|
RMVMSG MSGQ(JONES) MSGKEY(&MRKEY)</pre>
|
|
<p>The following <span class="cmdname">Remove Message (RMVMSG)</span> command
|
|
removes all messages from the call message queue for the procedure containing
|
|
the command. </p>
|
|
<pre>RMVMSG CLEAR(*ALL)</pre>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="wmsgs.htm" title="This discusses some of the ways that messages can be used to communicate between users and programs.">Messages</a></div>
|
|
</div>
|
|
<div class="reltasks"><strong>Related tasks</strong><br />
|
|
<div><a href="rmclp.htm" title="You can use the Receive Message (RCVMSG) command to obtain a message from a message queue for your procedure or program. This topic includes general information on receiving messages and the details on receiving request messages and request processing programs.">Receive messages into a CL procedure or program</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |