ibm-information-center/dist/eclipse/plugins/i5OS.ic.apis_5.4.0.1/QECCVTEW.htm

286 lines
7.7 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>Convert Edit Word (QECCVTEW) 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. -->
<!-- EDIT1H SCRIPT A converted by B2H R4.1 (346) (CMS) by V2KEA304 at -->
<!-- RCHVMW2 on 26 Jan 1999 at 16:28:12 -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!--File edited for tagging cleanup Oct 2001 by v2cdijab -->
<!--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>Convert Edit Word (QECCVTEW) API</h2>
<div class="box" style="width: 80%;">
<br>
&nbsp;&nbsp;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="50%">Edit mask</td>
<td align="left" valign="top" width="20%">Output</td>
<td align="left" valign="top" width="20%">Char(256)</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">Edit mask length</td>
<td align="left" valign="top">Output</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="left" valign="top">Receiver variable length</td>
<td align="left" valign="top">Output</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="left" valign="top">Edit word</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">5</td>
<td align="left" valign="top">Edit word length</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">6</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>
&nbsp;&nbsp;Optional Parameter Group:<br>
<!-- iddvc RMBR -->
<br>
<table width="100%">
<tr>
<td align="center" valign="top" width="10%">7</td>
<td align="left" valign="top" width="50%">Source length</td>
<td align="left" valign="top" width="20%">Input</td>
<td align="left" valign="top" width="20%">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">8</td>
<td align="left" valign="top">Currency symbol</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(1)</td>
</tr>
</table>
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: Yes<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The Convert Edit Word (QECCVTEW) API translates an edit word specification
into an edit mask. This is useful when one of the standard or user-defined edit
codes does not provide the editing required.</p>
<h3>Authorities and Locks</h3>
<p>None.</p>
<br>
<h3>Required Parameter Group</h3>
<dl>
<dt><strong>Edit mask</strong></dt>
<dd>OUTPUT; CHAR(256)
<p>Returns the edit mask generated by this call. The actual length of the edit
mask is returned in the edit mask length parameter. The area beyond the actual
length of the edit mask is filled with hexadecimal zeros.</p>
<p>The value returned to this parameter should be passed to the Edit (QECEDT)
API or the edit machine instruction.</p>
</dd>
<dt><strong>Edit mask length</strong></dt>
<dd>OUTPUT; BINARY(4)
<p>Returns the actual length of the edit mask parameter.</p>
<p>The value returned in this parameter should be passed to the QECEDT API or
used to substring the value returned in the edit mask in the edit machine
instruction.</p>
</dd>
<dt><strong>Receiver variable length</strong></dt>
<dd>OUTPUT; BINARY(4)
<p>The actual length of the output that is produced by the returned edit mask
when it is used.</p>
<p>The value returned in this parameter should be passed to the QECEDT API or
used to substring the value returned in the receiver variable in the edit
machine instruction.</p>
</dd>
<dt><strong>Edit word</strong></dt>
<dd>INPUT; CHAR(*)
<p>The edit word is translated into an edit mask. If the optional currency
symbol parameter is not used, the character in the system value QCURSYM is
treated as a currency symbol if it appears in the edit word.</p>
</dd>
<dt><strong>Edit word length</strong></dt>
<dd>INPUT; BINARY(4)
<p>The actual length of the edit word. The value passed must be from 1 through
256.</p>
</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>Optional Parameter Group</h3>
<dl>
<dt><strong>Source length</strong></dt>
<dd>INPUT; BINARY(4)
<p>The length of the source data that is to be edited. The length used is the
same as the value that would be used for the source variable precision
parameter of the QECEDT API.</p>
<p>An edit word may begin with a zero suppression character. If it does, two
different edit word combinations can be provided:</p>
<ul>
<li>The zero suppression character and the remaining number of replacement
characters equals the source length. This provides suppression of the leading
zero, only.</li>
<li>The zero suppression character plus the replacement characters is one more
than the source length. This results in no zero suppression.</li>
</ul>
<p>If the edit word provided is the second form, use this parameter. Otherwise,
an incorrect edit mask is generated because QECCVTEW assumes the first form of
editing is intended.</p>
</dd>
<dt><strong>Currency symbol</strong></dt>
<dd>INPUT; CHAR(1)
<p>The currency symbol to be placed in the edited output. If this value appears
in the edit word, it is used as the currency symbol.</p>
<p>If the value passed for currency symbol is X'00' (HEX zero), the API uses
the system value QCURSYM as the currency symbol.</p>
</dd>
</dl>
<br>
<h3>Error Messages</h3>
<table 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">CPF2620 E</td>
<td align="left" valign="top">Field longer than integer or fraction
mask.</td>
</tr>
<tr>
<td align="left" valign="top">CPF2639 E</td>
<td align="left" valign="top">Edit mask too large.</td>
</tr>
<tr>
<td align="left" valign="top">CPF265E E</td>
<td align="left" valign="top">Number of parameters specified not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF27B6 E</td>
<td align="left" valign="top">Edit word length not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C90 E</td>
<td align="left" valign="top">Literal value cannot be changed.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3CF1 E</td>
<td align="left" valign="top">Error code parameter not valid.</td>
</tr>
</table>
<br>
<hr>
API introduced: V2R2
<hr>
<table align="center" cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center">
<a href="#top_Of_Page">Top</a> |
<a href="edit1.htm">Edit Function APIs</a> |
<a href="aplist.htm">APIs by category</a></td>
</tr>
</table>
</body>
</html>