445 lines
12 KiB
HTML
445 lines
12 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 Code (QECCVTEC) 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 Code (QECCVTEC) 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="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">Zero balance fill character</td>
|
||
|
<td align="left" valign="top">Output</td>
|
||
|
<td align="left" valign="top">Char(1)</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="top">5</td>
|
||
|
<td align="left" valign="top">Edit code</td>
|
||
|
<td align="left" valign="top">Input</td>
|
||
|
<td align="left" valign="top">Char(1)</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="top">6</td>
|
||
|
<td align="left" valign="top">Fill or Floating currency indication</td>
|
||
|
<td align="left" valign="top">Input</td>
|
||
|
<td align="left" valign="top">Char(1)</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="top">7</td>
|
||
|
<td align="left" valign="top">Source variable precision</td>
|
||
|
<td align="left" valign="top">Input</td>
|
||
|
<td align="left" valign="top">Binary(4)</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="top">8</td>
|
||
|
<td align="left" valign="top">Source variable decimal positions</td>
|
||
|
<td align="left" valign="top">Input</td>
|
||
|
<td align="left" valign="top">Binary(4)</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="top">9</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 Convert Edit Code (QECCVTEC) API translates an edit code specification
|
||
|
into an edit mask, which is a byte string used to format a numeric value into a
|
||
|
readable character string.</p>
|
||
|
|
||
|
<br>
|
||
|
|
||
|
|
||
|
<h3>Authorities and Locks</h3>
|
||
|
|
||
|
<dl>
|
||
|
<dt><em>User-Defined Edit Code Authority</em></dt>
|
||
|
|
||
|
<dd>*USE</dd>
|
||
|
|
||
|
<dt><em>User-Defined Edit Code Library Authority</em></dt>
|
||
|
|
||
|
<dd>*EXECUTE</dd>
|
||
|
</dl>
|
||
|
|
||
|
<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>The actual length of the edit mask.</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>Returns the 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 receiver variable in the edit machine instruction.</p>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>Zero balance fill character</strong></dt>
|
||
|
|
||
|
<dd>OUTPUT; CHAR(1)
|
||
|
|
||
|
<p>Indicates how to perform the edit so that zero balance suppression is done
|
||
|
correctly for those edit codes that have zero balance suppression.</p>
|
||
|
|
||
|
<p>The value returned in this parameter should be passed to the QECEDT API or
|
||
|
used to determine whether zero suppression requires special handling before
|
||
|
issuing the edit machine instruction.</p>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>Edit code</strong></dt>
|
||
|
|
||
|
<dd>INPUT; CHAR(1)
|
||
|
|
||
|
<p>The edit code that is to be translated into an edit mask. The valid values
|
||
|
are:</p>
|
||
|
|
||
|
<p>A-D<br>
|
||
|
J-Q<br>
|
||
|
W<br>
|
||
|
Y-Z<br>
|
||
|
1-9</p>
|
||
|
|
||
|
<p>For more information on edit codes, see the discussion of the EDTCDE keyword
|
||
|
in the <a href="../rzakc/kickoff.htm ">DDS Reference: Display Files</a>.</p>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>Fill or floating currency indication</strong></dt>
|
||
|
|
||
|
<dd>INPUT; CHAR(1)
|
||
|
|
||
|
<p>Indicates how the output should be padded on the left. This parameter should
|
||
|
be specified as follows:</p>
|
||
|
|
||
|
<table cellpadding="5">
|
||
|
<!-- cols="15 85" -->
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><strong><em>" "</em></strong></td>
|
||
|
<td align="left" valign="top"><strong>Blank fill:</strong> All suppressed zeros
|
||
|
are replaced with blanks.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><strong><em>"*"</em></strong></td>
|
||
|
<td align="left" valign="top"><strong>Asterisk fill:</strong> All suppressed
|
||
|
zeros are replaced with asterisks.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><strong><em>Character</em></strong></td>
|
||
|
<td align="left" valign="top"><strong>Blank fill:</strong> The specified
|
||
|
character is used as a floating currency symbol and placed to the left of the
|
||
|
first nonsuppressed digit. Characters are X'41' to X'FE'.</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<p><strong>Note:</strong> You can optionally specify asterisk fill or floating
|
||
|
currency symbol with edit codes 1 through 4, A through D, and J through Q.</p>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>Source variable precision</strong></dt>
|
||
|
|
||
|
<dd>INPUT; BINARY(4)
|
||
|
|
||
|
<p>The precision of the numeric variable that is edited with the edit mask.
|
||
|
Precision is the displayed length of a field, not including the decimal point.
|
||
|
The valid ranges depend on the value specified for the edit code.</p>
|
||
|
|
||
|
<table cellpadding="5">
|
||
|
<!-- cols="15 85" -->
|
||
|
<tr>
|
||
|
<th align="left" valign="top">Edit Code</th>
|
||
|
<th align="left" valign="top">Range</th>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>W</em></td>
|
||
|
<td align="left" valign="top">5-8</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>Y</em></td>
|
||
|
<td align="left" valign="top">3-8</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>All others</em></td>
|
||
|
<td align="left" valign="top">1-31</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<p>The precision of the numeric variable depends on its class:</p>
|
||
|
|
||
|
<table cellpadding="5">
|
||
|
<!-- cols="15 85" -->
|
||
|
<tr>
|
||
|
<th align="left" valign="bottom">Variable<br>
|
||
|
Class</th>
|
||
|
<th align="left" valign="bottom">Precision</th>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>Packed</em></td>
|
||
|
<td align="left" valign="top">The precision for which the variable was
|
||
|
declared. For example, PACKED(8,4) has precision 8.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>Zoned</em></td>
|
||
|
<td align="left" valign="top">The precision for which the variable was
|
||
|
declared. For example, ZONED(8,4) has precision 8.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>Binary(2)</em></td>
|
||
|
<td align="left" valign="top">5</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>Binary(4)</em></td>
|
||
|
<td align="left" valign="top">10</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<p><strong>Notes:</strong></p>
|
||
|
|
||
|
<ol>
|
||
|
<li>Some high-level languages limit the maximum precision of packed and zoned
|
||
|
numeric variables.</li>
|
||
|
|
||
|
<li>Because the precision of the source variable is so important in creating
|
||
|
the edit mask, an edit mask can only be used to edit variables of the exact
|
||
|
precision.</li>
|
||
|
</ol>
|
||
|
|
||
|
<br>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>Source variable decimal positions</strong></dt>
|
||
|
|
||
|
<dd>INPUT; BINARY(4)
|
||
|
|
||
|
<p>The number of digits that the source variable precision parameter has placed
|
||
|
after the decimal point in the edited output. The value must be less than or
|
||
|
equal to source variable precision, but greater than 0. The normal value
|
||
|
depends on the class of the source variable precision parameter:</p>
|
||
|
|
||
|
<table cellpadding="5">
|
||
|
<!-- cols="15 85" -->
|
||
|
<tr>
|
||
|
<th align="left" valign="top">Variable<br>
|
||
|
Class</th>
|
||
|
<th align="left" valign="top">Decimal<br>
|
||
|
Position</th>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>Packed</em></td>
|
||
|
<td align="left" valign="top">The number of decimal positions for which the
|
||
|
variable was declared. For example, PACKED (8,4) has 4 decimal positions.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>Zoned</em></td>
|
||
|
<td align="left" valign="top">The number of decimal positions for which the
|
||
|
variable was declared. For example, ZONED (8,4) has 4 decimal positions.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>Binary(2)</em></td>
|
||
|
<td align="left" valign="top">0</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>Binary(4)</em></td>
|
||
|
<td align="left" valign="top">0</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 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">CPF27B2 E</td>
|
||
|
<td align="left" valign="top">Edit code not valid.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF27B3 E</td>
|
||
|
<td align="left" valign="top">Fill/floating currency indication not valid.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF27B4 E</td>
|
||
|
<td align="left" valign="top">Source variable precision not valid.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF27B5 E</td>
|
||
|
<td align="left" valign="top">Source decimal position 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>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF9801 E</td>
|
||
|
<td align="left" valign="top">Object &2 in library &3 not found.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF9802 E</td>
|
||
|
<td align="left" valign="top">Not authorized to object &2 in &3.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF9872 E</td>
|
||
|
<td align="left" valign="top">Program or service program &1 in library
|
||
|
&2 ended. Reason code &3.</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>
|
||
|
|