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

81 lines
4.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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="Allow for errors in a prompt override program" />
<meta name="abstract" content="Your prompt override program should include error handling." />
<meta name="description" content="Your prompt override program should include error handling." />
<meta name="DC.subject" content="prompt override program, allowing for errors" />
<meta name="keywords" content="prompt override program, allowing for errors" />
<meta name="DC.Relation" scheme="URI" content="wrtpop.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/sndpgmmsg.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="errorsover" />
<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>Allow for errors in a prompt override program</title>
</head>
<body id="errorsover"><a name="errorsover"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Allow for errors in a prompt override program</h1>
<div><p>Your prompt override program should include error handling.</p>
<div class="section"> <p>If the prompt override program detects an error, it should do
the following: </p>
<ul><li>Set the command string length to zero so that the defaults rather than
current values are displayed when the command is prompted.</li>
<li>Send a diagnostic message to the previous program on the call stack.</li>
<li>Send escape message CPF0011.</li>
</ul>
<p>For example, if you need a message saying that a library does not
exist, add a message description similar to the following: </p>
<pre>ADDMSGD MSG('Library &amp;2 does not exist') +
MSGID(USR0012) +
MSGF(QGPL/ACTMSG) +
SEV(40) +
FMT((*CHAR 4) (*CHAR 10))</pre>
<div class="note"><span class="notetitle">Note:</span> The substitution variable &amp;1 is not in the message but
is defined in the FMT parameter as 4 characters. &amp;1 is reserved for use
by the system and must always be 4 characters. If the substitution variable &amp;1
is the only substitution variable defined in the message, you must ensure
that the fourth byte of the message data does not contain a blank when you
send the message. The fourth byte is used by the system to manage messages
during command processing and prompting.</div>
<p>This message can be sent
to the calling program of the prompt override program by specifying the following
in the prompt override program: </p>
<pre>SNDPGMMSG MSGID(USR0012) MSGF(QGPL/ACTMSG) +
MSGDTA('0000' &amp;libname) MSGTYPE(*DIAG)</pre>
<p>After the prompt override program sends all the
necessary diagnostic messages, it should then send message CPF0011. To send
message CPF0011, use the Send Program Message (SNDPGMMSG) command as follows:
</p>
<pre>SNDPGMMSG MSGID(CPF0011) MSGF(QCPFMSG) +
MSGTYPE(*ESCAPE)</pre>
<p>When message CPF0011 is received, message CPD680A is sent to
the calling program and displayed on the prompt screen to indicate that errors
have been found. All diagnostic messages are placed in the user's job log.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="wrtpop.htm" title="A prompt override program needs to be passed certain information to return current values when a command is prompted.">Write a prompt override program</a></div>
</div>
<div class="relinfo"><strong>Related information</strong><br />
<div><a href="../cl/sndpgmmsg.htm">Send Program Message (SNDPGMMSG) command</a></div>
</div>
</div>
</body>
</html>