ibm-information-center/dist/eclipse/plugins/i5OS.ic.apiref_5.4.0.1/errorcodeformat.htm

252 lines
13 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="reference" />
<meta name="DC.Title" content="Error code parameter format" />
<meta name="abstract" content="Most iSeries APIs include an error code parameter to return error codes and exception data to the application. The error code parameter can be one of two variable-length structures, format ERRC0100 or format ERRC0200." />
<meta name="description" content="Most iSeries APIs include an error code parameter to return error codes and exception data to the application. The error code parameter can be one of two variable-length structures, format ERRC0100 or format ERRC0200." />
<meta name="DC.Relation" scheme="URI" content="error.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="errorcodeformat" />
<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>Error code parameter format</title>
</head>
<body id="errorcodeformat"><a name="errorcodeformat"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Error code parameter format</h1>
<div><p>Most iSeries™ APIs
include an error code parameter to return error codes and exception data to
the application. The error code parameter can be one of two variable-length
structures, format ERRC0100 or format ERRC0200.</p>
<div class="section"><p>In format ERRC0100, one field in that structure is an INPUT field;
it controls whether an exception is returned to the application or the error
code structure is filled in with the exception information. When the bytes
provided field is greater than or equal to 8, the rest of the error code structure
is filled in with the OUTPUT exception information associated with the error.
When the bytes provided INPUT field is zero, all other fields are ignored
and an exception is returned.</p>
<p>Format ERRC0200 must be used if the API
caller wants convertible character (CCHAR) support. Format ERRC0200 contains
two INPUT fields. The first field, called the key field, must contain a -1
to use CCHAR support. When the bytes provided field is greater than or equal
to 12, the rest of the error code structure is filled in with the OUTPUT exception
information associated with the error. When the bytes provided INPUT field
is zero, all other fields are ignored and an exception is returned.</p>
<p>For
some APIs, the error code parameter is optional. If you do not code the optional
error code parameter, the API returns diagnostic and escape messages. If you
do code the optional error code parameter, the API returns only escape messages
or error codes; it never returns diagnostic messages.</p>
<p>The structure
of the error code parameter is as follows. The fields are described in detail
after the tables.</p>
<div class="note"><span class="notetitle">Note:</span> The error code structures for both formats are
provided in the QUSEC include file in the QSYSINC library. Includes exist
in the following source physical files: QRPGSRC, QRPGLESRC, QLBLSRC, QCBLLESRC,
and H.</div>
</div>
<div class="section"><h4 class="sectiontitle">Format ERRC0100</h4></div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><thead align="left"><tr><th colspan="2" valign="top" id="d0e38">Offset</th>
<th rowspan="2" valign="top" id="d0e40">Use</th>
<th rowspan="2" valign="top" id="d0e42">Type</th>
<th rowspan="2" valign="top" id="d0e44">Field</th>
</tr>
<tr><th valign="top" id="d0e47">Dec</th>
<th valign="top" id="d0e49">Hex</th>
</tr>
</thead>
<tbody><tr><td valign="top" headers="d0e38 d0e47 ">0</td>
<td valign="top" headers="d0e38 d0e49 ">0</td>
<td valign="top" headers="d0e40 ">INPUT</td>
<td valign="top" headers="d0e42 ">BINARY(4)</td>
<td valign="top" headers="d0e44 ">Bytes provided</td>
</tr>
<tr><td valign="top" headers="d0e38 d0e47 ">4</td>
<td valign="top" headers="d0e38 d0e49 ">4</td>
<td valign="top" headers="d0e40 ">OUTPUT</td>
<td valign="top" headers="d0e42 ">BINARY(4)</td>
<td valign="top" headers="d0e44 ">Bytes available</td>
</tr>
<tr><td valign="top" headers="d0e38 d0e47 ">8</td>
<td valign="top" headers="d0e38 d0e49 ">8</td>
<td valign="top" headers="d0e40 ">OUTPUT</td>
<td valign="top" headers="d0e42 ">CHAR(7)</td>
<td valign="top" headers="d0e44 ">Exception ID</td>
</tr>
<tr><td valign="top" headers="d0e38 d0e47 ">15</td>
<td valign="top" headers="d0e38 d0e49 ">F</td>
<td valign="top" headers="d0e40 ">OUTPUT</td>
<td valign="top" headers="d0e42 ">CHAR(1)</td>
<td valign="top" headers="d0e44 ">Reserved</td>
</tr>
<tr><td valign="top" headers="d0e38 d0e47 ">16</td>
<td valign="top" headers="d0e38 d0e49 ">10</td>
<td valign="top" headers="d0e40 ">OUTPUT</td>
<td valign="top" headers="d0e42 ">CHAR(*)</td>
<td valign="top" headers="d0e44 ">Exception data</td>
</tr>
</tbody>
</table>
</div>
<div class="section"><h4 class="sectiontitle">Format ERRC0200</h4></div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><thead align="left"><tr><th colspan="2" valign="top" id="d0e119">Offset</th>
<th rowspan="2" valign="top" id="d0e121">Use</th>
<th rowspan="2" valign="top" id="d0e123">Type</th>
<th rowspan="2" valign="top" id="d0e125">Field</th>
</tr>
<tr><th valign="top" id="d0e128">Dec</th>
<th valign="top" id="d0e130">Hex</th>
</tr>
</thead>
<tbody><tr><td valign="top" headers="d0e119 d0e128 ">0</td>
<td valign="top" headers="d0e119 d0e130 ">0</td>
<td valign="top" headers="d0e121 ">INPUT</td>
<td valign="top" headers="d0e123 ">BINARY(4)</td>
<td valign="top" headers="d0e125 ">Key</td>
</tr>
<tr><td valign="top" headers="d0e119 d0e128 ">4</td>
<td valign="top" headers="d0e119 d0e130 ">4</td>
<td valign="top" headers="d0e121 ">INPUT</td>
<td valign="top" headers="d0e123 ">BINARY(4)</td>
<td valign="top" headers="d0e125 ">Bytes provided</td>
</tr>
<tr><td valign="top" headers="d0e119 d0e128 ">8</td>
<td valign="top" headers="d0e119 d0e130 ">8</td>
<td valign="top" headers="d0e121 ">OUTPUT</td>
<td valign="top" headers="d0e123 ">BINARY(4)</td>
<td valign="top" headers="d0e125 ">Bytes available</td>
</tr>
<tr><td valign="top" headers="d0e119 d0e128 ">12</td>
<td valign="top" headers="d0e119 d0e130 ">C</td>
<td valign="top" headers="d0e121 ">OUTPUT</td>
<td valign="top" headers="d0e123 ">CHAR(7)</td>
<td valign="top" headers="d0e125 ">Exception ID</td>
</tr>
<tr><td valign="top" headers="d0e119 d0e128 ">19</td>
<td valign="top" headers="d0e119 d0e130 ">13</td>
<td valign="top" headers="d0e121 ">OUTPUT</td>
<td valign="top" headers="d0e123 ">CHAR(1)</td>
<td valign="top" headers="d0e125 ">Reserved</td>
</tr>
<tr><td valign="top" headers="d0e119 d0e128 ">20</td>
<td valign="top" headers="d0e119 d0e130 ">14</td>
<td valign="top" headers="d0e121 ">OUTPUT</td>
<td valign="top" headers="d0e123 ">BINARY(4)</td>
<td valign="top" headers="d0e125 ">CCSID of the CCHAR data</td>
</tr>
<tr><td valign="top" headers="d0e119 d0e128 ">24</td>
<td valign="top" headers="d0e119 d0e130 ">18</td>
<td valign="top" headers="d0e121 ">OUTPUT</td>
<td valign="top" headers="d0e123 ">BINARY(4)</td>
<td valign="top" headers="d0e125 ">Offset to the exception data</td>
</tr>
<tr><td valign="top" headers="d0e119 d0e128 ">28</td>
<td valign="top" headers="d0e119 d0e130 ">1C</td>
<td valign="top" headers="d0e121 ">OUTPUT</td>
<td valign="top" headers="d0e123 ">BINARY(4)</td>
<td valign="top" headers="d0e125 ">Length of the exception data</td>
</tr>
<tr><td valign="top" headers="d0e119 d0e128 ">&nbsp;</td>
<td valign="top" headers="d0e119 d0e130 ">&nbsp;</td>
<td valign="top" headers="d0e121 ">OUTPUT</td>
<td valign="top" headers="d0e123 ">CHAR(*)</td>
<td valign="top" headers="d0e125 ">Exception data</td>
</tr>
</tbody>
</table>
</div>
<div class="section"><h4 class="sectiontitle">Field descriptions</h4><p>This topic describes the fields
returned in further detail. Field descriptions are in alphabetical order.</p>
<p><span class="uicontrol">Bytes
available.</span> The length of the error information available to the
API to return, in bytes. If this is 0, no error was detected and none of the
fields that follow this field in the structure are changed.</p>
<p><span class="uicontrol">Bytes
provided.</span> The number of bytes that the calling application provides
for the error code. If the API caller is using format ERRC0100, the bytes
provided must be 0, 8, or more than 8. If more than 32 783 bytes (32KB for
exception data plus 16 bytes for other fields) are specified, it is not an
error, but only 32 767 bytes (32KB) can be returned in the exception data.</p>
<p>If
the API caller is using format ERRC0200, the bytes provided must be 0, 12,
or more than 12. If more than 32 799 bytes (32KB for exception data plus 32
bytes for other fields) are specified, it is not an error, but only 32 767
bytes (32KB) can be returned in the exception data.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><thead align="left"><tr valign="bottom"><th valign="bottom" id="d0e251">Bytes</th>
<th valign="bottom" id="d0e253">Description</th>
</tr>
</thead>
<tbody><tr><td valign="top" headers="d0e251 "><em>0</em></td>
<td valign="top" headers="d0e253 ">If an error occurs, an exception is returned to the application to
indicate that the requested function failed.</td>
</tr>
<tr><td valign="top" headers="d0e251 "><em>&gt;=8</em></td>
<td valign="top" headers="d0e253 ">If an error occurs, the space is filled in with the exception information.
No exception is returned. This only occurs if format ERRC0100 is used.</td>
</tr>
<tr><td valign="top" headers="d0e251 "><em>&gt;=12</em></td>
<td valign="top" headers="d0e253 ">If an error occurs, the space is filled in with the exception information.
No exception is returned. This only occurs if format ERRC0200 is used.</td>
</tr>
</tbody>
</table>
</div>
<p><strong>CCSID of the CCHAR data.</strong> The coded character set identifier
(CCSID) of the convertible character (CCHAR) portion of the exception data.
The default is 0.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><thead align="left"><tr valign="bottom"><th valign="bottom" id="d0e284">CCSID</th>
<th valign="bottom" id="d0e286">Description</th>
</tr>
</thead>
<tbody><tr><td valign="top" headers="d0e284 "><em>0</em></td>
<td valign="top" headers="d0e286 ">The default job CCSID.</td>
</tr>
<tr><td valign="top" headers="d0e284 "><em>CCSID</em></td>
<td valign="top" headers="d0e286 ">A valid CCSID number. The valid CCSID range is 1 through 65535, but
not 65534.</td>
</tr>
</tbody>
</table>
</div>
<p><span class="uicontrol">Exception data.</span> A variable-length character
field that contains the insert data associated with the exception ID.</p>
<p><span class="uicontrol">Exception
ID.</span> The identifier for the message for the error condition.</p>
<p><span class="uicontrol">Key.</span>
The key value that enables the message handler error function if CCHAR support
is used. This value should be -1 if CCHAR support is expected.</p>
<p><span class="uicontrol">Length
of the exception data.</span> The length, in bytes, of the exception
data returned in the error code.</p>
<p><span class="uicontrol">Offset to the exception
data.</span> The offset from the beginning of the error code structure
to the exception data in the error code structure.</p>
<p><span class="uicontrol">Reserved.</span>
A 1-byte reserved field.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="error.htm" title="An API error code parameter is a variable-length structure that is common to all of the system APIs.">Error code parameter</a></div>
</div>
</div>
</body>
</html>