208 lines
6.5 KiB
HTML
208 lines
6.5 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||
|
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
|
||
|
<title>Set COBOL Error Handler (QlnSetCobolErrorHandler) API</title>
|
||
|
<!-- Begin Header Records ========================================== -->
|
||
|
<!-- 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. -->
|
||
|
<!-- NETMG2 SCRIPT A converted by B2H R4.1 (346) (CMS) by HOLTJM at -->
|
||
|
<!-- RCHVMW2 on 29 Jan 1999 at 10:01:37 -->
|
||
|
<!-- Change History: -->
|
||
|
<!-- YYMMDD USERID Change description -->
|
||
|
<!--File Edited by Kersten Oct 2001 -->
|
||
|
<!--End Header Records -->
|
||
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
||
|
</head>
|
||
|
<body>
|
||
|
<a name="Top_Of_Page"></a>
|
||
|
<!-- Java sync-link -->
|
||
|
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript">
|
||
|
</script>
|
||
|
|
||
|
<h2>Set COBOL Error Handler (QlnSetCobolErrorHandler) API</h2>
|
||
|
|
||
|
<div class="box" style="width: 70%;">
|
||
|
<br>
|
||
|
Required Parameter Group:<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
<table width="100%">
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="top" width="10%">1</td>
|
||
|
<td align="left" valign="top" width="60%">New error-handling exit procedure
|
||
|
pointer</td>
|
||
|
<td align="left" valign="top" width="15%">Input</td>
|
||
|
<td align="left" valign="top" width="15%">Anyptr</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="top">2</td>
|
||
|
<td align="left" valign="top">Current error-handling exit procedure
|
||
|
pointer</td>
|
||
|
<td align="left" valign="top">Output</td>
|
||
|
<td align="left" valign="top">Anyptr</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="top">3</td>
|
||
|
<td align="left" valign="top">Error code</td>
|
||
|
<td align="left" valign="top">I/O</td>
|
||
|
<td align="left" valign="top">Char(*)</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
Default Public Authority: *USE<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
Threadsafe: No<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
</div>
|
||
|
|
||
|
<p>The Set COBOL Error Handler (QlnSetCobolErrorHandler) API allows you to
|
||
|
specify the identity of a COBOL error-handling procedure. You can call it from
|
||
|
any ILE programming language; however, this API only sets the procedure pointer
|
||
|
of the error-handling program that is called when an error occurs in an ILE
|
||
|
COBOL/400 program.</p>
|
||
|
|
||
|
<p>After you call this API, any ILE COBOL/400 program that issues an inquiry
|
||
|
message with options C, D, or F will first call the defined error-handling
|
||
|
procedure. This procedure receives the message identification and substitution
|
||
|
text, as well as the name of the program that received it, and a list of valid
|
||
|
1-character responses. The defined procedure is responsible for returning a
|
||
|
1-character code (blank, C, D, F, or G) indicating whether the COBOL program
|
||
|
should continue or not.</p>
|
||
|
|
||
|
<p><strong>Note:</strong> All messages issued by the operating system during
|
||
|
the running of a COBOL program are monitored by the COBOL program. Only some of
|
||
|
the system messages issued will result in a COBOL inquiry message.</p>
|
||
|
|
||
|
<p>You can define a different error-handling procedure for each activation
|
||
|
group.</p>
|
||
|
|
||
|
<p>Only one ILE error-handling procedure can be active at a time. If an error
|
||
|
occurs in the error-handling procedure, the COBOL program does not call the
|
||
|
error-handling procedure again. (In other words, recursive calls do not occur.)
|
||
|
Instead, the inquiry message would be issued as if no error-handling procedure
|
||
|
were defined.</p>
|
||
|
|
||
|
<p>You cannot change the error-handling procedure while it is responding to an
|
||
|
error in a COBOL program.</p>
|
||
|
|
||
|
<p>If an error occurs during the calling of the error-handling procedure, an
|
||
|
informational message (LNR7430) is issued, and processing continues as if no
|
||
|
error-handling procedure were defined.</p>
|
||
|
|
||
|
<p>The error-handling procedure is defined by the user. The parameters
|
||
|
aredescribed under <a href="XLNERHND.htm">ILE COBOL Error-Handling Exit
|
||
|
Procedure</a>.</p>
|
||
|
|
||
|
<br>
|
||
|
<!-- Please NOTE: DO NOT DELETE THIS SECTION if this API has no authorities and locks. -->
|
||
|
<!-- Instead, use the commented out coding below to indicate NONE. -->
|
||
|
<h3>Authorities and Locks</h3>
|
||
|
|
||
|
<!-- Use this if there are no authorities and locks. -->
|
||
|
<p>None.</p>
|
||
|
|
||
|
<br>
|
||
|
<h3>Required Parameter Group</h3>
|
||
|
|
||
|
<dl>
|
||
|
<dt><strong>New error-handling exit procedure pointer</strong></dt>
|
||
|
|
||
|
<dd>INPUT; ANYPTR
|
||
|
|
||
|
<p>The pointer to the new error-handling procedure that you want to set.</p>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>Current error-handling exit procedure pointer</strong></dt>
|
||
|
|
||
|
<dd>OUTPUT; ANYPTR
|
||
|
|
||
|
<p>The pointer to the error-handling procedure that was in place before the new
|
||
|
error-handling procedure was set.</p>
|
||
|
|
||
|
<p>Valid values are:</p>
|
||
|
|
||
|
<table cellpadding="5">
|
||
|
<!-- cols="15 85" -->
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>NULL</em></td>
|
||
|
<td align="left" valign="top">No current error-handling exit procedure was found.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>procedure-pointer</em></td>
|
||
|
<td align="left" valign="top">The pointer to the error-handling procedure.</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>Error code</strong></dt>
|
||
|
|
||
|
<dd>I/O; CHAR(*)
|
||
|
|
||
|
<p>The structure in which to return error information. For the format of the
|
||
|
structure, see <a href="../apiref/error.htm#hdrerrcod">Error code parameter</a>.</p>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
<br>
|
||
|
<h3>Error Messages</h3>
|
||
|
|
||
|
<table width="100%" cellpadding="5">
|
||
|
<!-- cols="15 85" -->
|
||
|
<tr>
|
||
|
<th align="left" valign="top" nowrap>Message ID</th>
|
||
|
<th align="left" valign="top">Error Message Text</th>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top" width="15%">CPF3C90 E</td>
|
||
|
<td align="left" valign="top" width="85%">Literal value cannot be changed.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">LNR7074 E</td>
|
||
|
<td align="left" valign="top">Error code not valid.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">LNR7075 E</td>
|
||
|
<td align="left" valign="top">Error addressing API parameters.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">LNR7077 E</td>
|
||
|
<td align="left" valign="top">Procedure reference not valid.</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
|
||
|
|
||
|
<hr>
|
||
|
API introduced: V2R2
|
||
|
|
||
|
<hr>
|
||
|
<center>
|
||
|
<table cellpadding="2" cellspacing="2">
|
||
|
<tr align="center"><td valign="middle" align="center">
|
||
|
<a href="#Top_Of_Page">Top</a> |
|
||
|
<a href="hll.htm">High-level language APIs</a> |
|
||
|
<a href="aplist.htm">APIs by category</a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</center>
|
||
|
</body>
|
||
|
</html>
|