ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzakj_5.4.0.1/rzakjerrorcall.htm

59 lines
3.5 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="Monitor for errors after a CALL command" />
<meta name="abstract" content="When a program that uses commitment control is called, monitor for unexpected errors and perform a rollback operation if an error occurs." />
<meta name="description" content="When a program that uses commitment control is called, monitor for unexpected errors and perform a rollback operation if an error occurs." />
<meta name="DC.Relation" scheme="URI" content="rzakjcommiterror.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2004, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2004, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rzakjerrorcall" />
<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>Monitor for errors after a CALL command</title>
</head>
<body id="rzakjerrorcall"><a name="rzakjerrorcall"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Monitor for errors after a CALL command</h1>
<div><p>When a program that uses commitment control is called, monitor
for unexpected errors and perform a rollback operation if an error occurs. </p>
<p>For example, uncommitted records can
exist when a program encounters an unexpected error such as an RPG divide-by-zero
error.</p>
<p>Depending on the status of the inquiry message reply (INQMSGRPY) parameter
for a job, the program sends an inquiry message or performs a default action.
If the operator response or the default action ends the program, uncommitted
records still exist waiting for a commit or rollback operation.</p>
<p>If another program is called and causes a commit operation, the partially
completed transaction from the previous program is committed.</p>
<p>To prevent partially completed transactions from being committed, monitor
for escape messages after the CALL command. For example, if it is an RPG program,
use the following coding:</p>
<pre>CALL RPGA
MONMSG MSGID(RPG9001)
EXEC(ROLLBACK) /*Rollback if pgm is canceled*/</pre>
<p>If it is a COBOL program:</p>
<pre>CALL COBOLA
MONMSG MSGID(CBE9001)
EXEC(ROLLBACK) /*Rollback if pgm is canceled*/</pre>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakjcommiterror.htm" title="When you use commitment control, it is important to understand which conditions cause errors and which do not.">Commitment control errors</a></div>
</div>
</div>
</body>
</html>