ibm-information-center/dist/eclipse/plugins/i5OS.ic.rbam6_5.4.0.1/wmsgs.htm

164 lines
12 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="Messages" />
<meta name="abstract" content="This discusses some of the ways that messages can be used to communicate between users and programs." />
<meta name="description" content="This discusses some of the ways that messages can be used to communicate between users and programs." />
<meta name="DC.subject" content="working with, messages, message, ADDMSGD (Add Message Description) command, specifying information, Add Message Description (ADDMSGD) command, specifying information, adding, message description, value" />
<meta name="keywords" content="working with, messages, message, ADDMSGD (Add Message Description) command, specifying information, Add Message Description (ADDMSGD) command, specifying information, adding, message description, value" />
<meta name="DC.Relation" scheme="URI" content="rbam6clmain.htm" />
<meta name="DC.Relation" scheme="URI" content="msghd.htm" />
<meta name="DC.Relation" scheme="URI" content="msgusequeues.htm" />
<meta name="DC.Relation" scheme="URI" content="msgsu.htm" />
<meta name="DC.Relation" scheme="URI" content="msgcl.htm" />
<meta name="DC.Relation" scheme="URI" content="rmclp.htm" />
<meta name="DC.Relation" scheme="URI" content="rmtcl.htm" />
<meta name="DC.Relation" scheme="URI" content="msgmq.htm" />
<meta name="DC.Relation" scheme="URI" content="monmg.htm" />
<meta name="DC.Relation" scheme="URI" content="rcvmsgpgm.htm" />
<meta name="DC.Relation" scheme="URI" content="bhprg.htm" />
<meta name="DC.Relation" scheme="URI" content="msghandlereplies.htm" />
<meta name="DC.Relation" scheme="URI" content="subfi.htm" />
<meta name="DC.Relation" scheme="URI" content="mlogg.htm" />
<meta name="DC.Relation" scheme="URI" content="qsysm.htm" />
<meta name="DC.Relation" scheme="URI" content="monms.htm" />
<meta name="DC.Relation" scheme="URI" content="allor.htm" />
<meta name="DC.Relation" scheme="URI" content="check.htm" />
<meta name="DC.Relation" scheme="URI" content="srfil.htm" />
<meta name="DC.Relation" scheme="URI" content="tmtmq.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/addmsgd.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="wmsgs" />
<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>Messages</title>
</head>
<body id="wmsgs"><a name="wmsgs"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Messages</h1>
<div><p>This discusses some of the ways that messages can be used to communicate
between users and programs. </p>
<div class="section"> <p>On the iSeries™ server, communication between procedures
or programs, between jobs, between users, and between users and procedures
or programs occurs through messages. Messages can be sent:</p>
<ul><li>From one system user to another system user, even if the receiver of the
messages is not currently using the system</li>
<li>From one OPM program or ILE procedure to another OPM program or ILE procedure</li>
<li>From a program or procedure to a system user, even if the receiver of
the messages is not currently using the system</li>
</ul>
<p>A message can be predefined or immediate: </p>
<ul><li>A predefined message is created and exists outside the program that uses
it. Predefined messages are stored in message files and have a message number.
An example of a system predefined message is: <pre>CPF0006 Errors occurred in command.</pre>
</li>
<li>An immediate message is created by the sender at the time it is sent.
An immediate message is not stored in a message file. An example of an immediate
message received at a display station is: <pre>From . . . : QSYSOPR 06/12/05 10:50:54
System going down at 11:00; please sign off</pre>
</li>
</ul>
<p>Interactive system users can send only immediate messages and replies.</p>
<p>OPM
programs or ILE procedures can send immediate messages or predefined messages
with user-defined data. In addition, programs or procedures can: </p>
<ul><li>Receive messages</li>
<li>Retrieve a message description from a message file and place it into a
program variable</li>
<li>Remove messages from a message queue</li>
<li>Monitor for messages</li>
</ul>
<p>Your system comes with an extensive set of predefined messages that
allow communication between programs within the system and between the system
and its users. Each licensed program you order has a message file that is
stored in the same library as the licensed program it applies to. For example,
system messages are stored in the file QCPFMSG in the library QSYS.</p>
<p>The
system uniquely identifies each predefined message in a message file by a
7-character code and defines it by a message description. The message description
contains information such as message text and message help text, severity
level, valid and default reply values, and various other attributes.</p>
<p>All
messages that are sent or received in the system are transmitted through a
message queue. Messages that are issued in response to a direct request,
such as a command, are automatically displayed on the display from which the
request was made. For all other messages, the user, program or procedure
must receive the message from the queue or display it. There are several IBM-supplied
message queues in the system.</p>
<p>The system also writes some of the messages
that are issued to logs. A job log contains information related to requests
entered for a job, the history log contains job, subsystem, and device status
information. </p>
</div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="msghd.htm">Define message descriptions</a></strong><br />
Predefined messages are stored in a message file.</li>
<li class="ulchildlink"><strong><a href="msgusequeues.htm">Use message queues</a></strong><br />
This covers the types of message queues, how to create or change a message queue, and details about job message queues.</li>
<li class="ulchildlink"><strong><a href="msgsu.htm">Send messages to a system user</a></strong><br />
Several commands can be used to send messages to system users.</li>
<li class="ulchildlink"><strong><a href="msgcl.htm">Send messages from a CL program</a></strong><br />
Various message types are described in this topic. Use the <span class="cmdname">Send
Program Message (SNDPGMMSG)</span> command or the <span class="cmdname">Send User Message
(SNDUSRMSG)</span> command to send a message from a CL procedure or program.</li>
<li class="ulchildlink"><strong><a href="rmclp.htm">Receive messages into a CL procedure or program</a></strong><br />
You can use the <span class="cmdname">Receive Message (RCVMSG)</span> 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.</li>
<li class="ulchildlink"><strong><a href="rmtcl.htm">Retrieve message descriptions from a message file</a></strong><br />
You can retrieve the text of a message from a message file into a variable in a CL procedure.</li>
<li class="ulchildlink"><strong><a href="msgmq.htm">Remove messages from a message queue</a></strong><br />
Messages are held on a message queue until they are removed</li>
<li class="ulchildlink"><strong><a href="monmg.htm">Monitor for messages in a CL program or procedure</a></strong><br />
You can monitor for exception messages. Exception messages include escape, notify, and status messages that are sent to your CL procedure's or program's call message queue by the commands in your procedure or program or by commands in another procedure or program. Diagnostic messages cannot be monitored.</li>
<li class="ulchildlink"><strong><a href="rcvmsgpgm.htm">Receive a message from a program or procedure that has ended</a></strong><br />
This topic describes how to receive messages from an inactive call message queue.</li>
<li class="ulchildlink"><strong><a href="bhprg.htm">Use break-handling programs</a></strong><br />
A break-handling program is one that is automatically called when a message arrives at a message queue that is in *BREAK mode.</li>
<li class="ulchildlink"><strong><a href="msghandlereplies.htm">Handle replies to inquiry messages</a></strong><br />
This topic covers using a sender copy message to obtain a reply, finding the job that sent a reply, using the system reply list, and using reply handling exit programs.</li>
<li class="ulchildlink"><strong><a href="subfi.htm">Use message subfiles in a CL program or procedure</a></strong><br />
In CL procedures and programs, message subfiles are the only type of subfiles supported. Message subfiles let a controlling procedure or program display one or more error messages.</li>
<li class="ulchildlink"><strong><a href="mlogg.htm">Log messages</a></strong><br />
There are two types of logs for messages: job logs and history logs.</li>
<li class="ulchildlink"><strong><a href="qsysm.htm">Use QSYSMSG message queue</a></strong><br />
QSYSMSG is a queue that you can create if you plan to handle the list of serious messages that are sent to the queue.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbam6clmain.htm">Control language</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="tmtmq.htm" title="All messages on the system are sent to a message queue.">Types of message queues</a></div>
</div>
<div class="reltasks"><strong>Related tasks</strong><br />
<div><a href="allor.htm" title="Objects are allocated on the system to guarantee integrity and to promote the highest possible degree of concurrency.">Allocate resources</a></div>
<div><a href="check.htm" title="Before attempting to use an object in a program, check to determine if the object exists and if you have the authority to use it.">Check for the existence of an object</a></div>
<div><a href="srfil.htm" title="The only commands you can use with a display file to send or receive data in CL procedures and programs are the Send File (SNDF), Receive File (RCVF), and Send/Receive File (SNDRCVF) commands.">Send and receive data with a display file</a></div>
</div>
<div class="relref"><strong>Related reference</strong><br />
<div><a href="monms.htm" title="The Monitor Message (MONMSG) command is used to monitor for escape, notify, or status messages sent to the call stack of the procedure in which the Monitor Message (MONMSG) command is used.">Monitor Message (MONMSG) Command</a></div>
</div>
<div class="relinfo"><strong>Related information</strong><br />
<div><a href="../cl/addmsgd.htm">Add Message Description (ADDMSGD) command</a></div>
</div>
</div>
</body>
</html>