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

68 lines
4.4 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="concept" />
<meta name="DC.Title" content="Completion and diagnostic messages" />
<meta name="abstract" content="Using the Send User Message (SNDUSRMSG) command, you can send diagnostic and completion messages." />
<meta name="description" content="Using the Send User Message (SNDUSRMSG) command, you can send diagnostic and completion messages." />
<meta name="DC.subject" content="completion message, diagnostic message, example, sending, program message, message, escape, purpose" />
<meta name="keywords" content="completion message, diagnostic message, example, sending, program message, message, escape, purpose" />
<meta name="DC.Relation" scheme="URI" content="msgcl.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="codim" />
<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>Completion and diagnostic messages</title>
</head>
<body id="codim"><a name="codim"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Completion and diagnostic messages</h1>
<div><p>Using the <span class="cmdname">Send User Message (SNDUSRMSG)</span> command,
you can send diagnostic and completion messages.</p>
<p>You can send these message types to any message queue from your CL procedure
or program. Diagnostic messages tell the calling program or procedure about
errors detected by the CL procedure or program. Completion messages tell the
results of work done by the CL procedure or program.</p>
<p>Normally, an escape message is sent to the message queue of the calling
program or procedure to tell the caller what the problem was or that diagnostic
messages were also sent. For a completion message, an escape message is usually
not sent because the requested function was performed.</p>
<p>For an example of sending a completion message, assume that the system
operator uses the command entry display to call a CL program SAVPAY to save
certain objects. The CL program contains only the following procedure which
saves the objects and then issues the following completion message: </p>
<pre>PGM
SAVOBJ OBJ(PAY1 PAY2) LIB(PAYROLL) CLEAR(*YES)
SNDPGMMSG MSG('Payroll objects have been saved') MSGTYPE(*COMP)
ENDPGM</pre>
<p>If the <span class="cmdname">Save Object (SAVOBJ)</span> command fails, the CL procedure
function checks and the system operator has to display the detailed messages
to locate the specific escape message explaining the reason for the failure.
If the SAVOBJ command completes successfully, the completion message is sent
to the call message queue associated with the program that displays the command
entry display.</p>
<p>One of the advantages of completion messages is their consistency with
IBM-supplied commands. Many IBM<sup>®</sup> commands send completion messages indicating successful
completion. Seeing the type of message sent to the job log can assist in
problem analysis.</p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="msgcl.htm" title="Various message types are described in this topic. Use the Send Program Message (SNDPGMMSG) command or the Send User Message (SNDUSRMSG) command to send a message from a CL procedure or program.">Send messages from a CL program</a></div>
</div>
</div>
</body>
</html>