ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzakc_5.4.0.1/rzakcmstdfffixd.htm

112 lines
7.1 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="FLTFIXDEC (Floating-Point to Fixed Decimal) keyword for display files" />
<meta name="abstract" content="Use this field-level keyword to display a number in an output-capable (usage B or O) floating point field in fixed decimal notation." />
<meta name="description" content="Use this field-level keyword to display a number in an output-capable (usage B or O) floating point field in fixed decimal notation." />
<meta name="DC.subject" content="FLTFIXDEC (Floating-Point to Fixed Decimal) keyword, Floating-Point to Fixed Decimal (FLTFIXDEC) keyword" />
<meta name="keywords" content="FLTFIXDEC (Floating-Point to Fixed Decimal) keyword, Floating-Point to Fixed Decimal (FLTFIXDEC) keyword" />
<meta name="DC.Relation" scheme="URI" content="rzakcmstkeyent.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2001, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2001, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rzakcmstdfffixd" />
<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>FLTFIXDEC (Floating-Point to Fixed Decimal) keyword for display files</title>
</head>
<body id="rzakcmstdfffixd"><a name="rzakcmstdfffixd"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">FLTFIXDEC (Floating-Point to Fixed Decimal) keyword for display files</h1>
<div><p>Use this field-level keyword to display a number in an output-capable
(usage B or O) floating point field in fixed decimal notation.</p>
<div class="section"><p>This keyword has no parameters.</p>
<p>The floating-point number
is first converted to the equivalent number with an exponent of zero. If the
resulting number (digits and exponent) will fit in the field defined by the
length and decimal positions values, the number is displayed with the exponent
suppressed and aligned at the decimal point. If the number will not fit in
the field defined by the length and decimal position values, the number is
displayed in standard floating point form, n.nnnnnnE+nnn. When FLTFIXDEC is
specified, the display length of the field is the DDS length plus 2 (the sign
and the decimal point). The minimum length of the field is 6.</p>
<div class="p">When the
number is too large or small for the fixed-point form specified by FLTFIXDEC
with the total digits and fractional digits specified for the field, a floating
point form is displayed that presents the significand as follows. (The significand
is the string of digits including the sign and decimal point to the left of
the exponent character E.) <ul><li>Total significand decimal digits: DDS total digits minus 5</li>
<li>Fractional significand digits: DDS total digits minus 6</li>
</ul>
</div>
<p>FLTFIXDEC has no effect on the input format of the data. Numbers
can be typed into the field in either fixed point or floating point format.
When displayed again, however, FLTFIXDEC will be used to determine the display
format.</p>
<p>Option indicators are not valid for this keyword.</p>
</div>
<div class="example"><h4 class="sectiontitle">Example</h4><p>The following example shows how to specify
the FLTFIXDEC keyword.</p>
<pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
A R RECFMT1
A FIELD1 10F 3B 1 2FLTFIXDEC
A FLTPCN(*DOUBLE)
A</pre>
<div class="p">The output numbers for the example
will be converted as follows:
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="void" border="0" rules="none"><thead align="left"><tr><th align="left" valign="top" width="50%" id="d0e48">Output number</th>
<th align="left" valign="top" width="50%" id="d0e50">Displayed as</th>
</tr>
</thead>
<tbody><tr><td align="left" valign="top" width="50%" headers="d0e48 "><samp class="codeph">-4.99994321000000E-004</samp></td>
<td align="left" valign="top" width="50%" headers="d0e50 "><samp class="codeph">'-4.9999E-004'</samp></td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e48 "><samp class="codeph">-5.00010000000000E-004</samp></td>
<td valign="top" width="50%" headers="d0e50 "><samp class="codeph">' -0.001'</samp></td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e48 "><samp class="codeph">-2.69123400000000E-002</samp></td>
<td valign="top" width="50%" headers="d0e50 "><samp class="codeph">' -0.027'</samp></td>
</tr>
<tr><td valign="top" width="50%" headers="d0e48 "><samp class="codeph">-0.00000000000000E+000</samp></td>
<td valign="top" width="50%" headers="d0e50 "><samp class="codeph">' 0.000'</samp></td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e48 "><samp class="codeph">0.00000000000000E+000</samp></td>
<td valign="top" width="50%" headers="d0e50 "><samp class="codeph">' 0.000'</samp></td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e48 "><samp class="codeph">2.71828182845900E++003</samp></td>
<td valign="top" width="50%" headers="d0e50 "><samp class="codeph">' 2718.282'</samp></td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e48 "><samp class="codeph">3.14159000000000E-052</samp></td>
<td valign="top" width="50%" headers="d0e50 "><samp class="codeph">'3.1416E-052'</samp></td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e48 "><samp class="codeph">9.87654321012345E+006</samp></td>
<td valign="top" width="50%" headers="d0e50 "><samp class="codeph">'9876543.210'</samp></td>
</tr>
<tr><td align="left" valign="top" width="50%" headers="d0e48 "><samp class="codeph">9.99999999960000E+006</samp></td>
<td valign="top" width="50%" headers="d0e50 "><samp class="codeph">'1.0000E+007'</samp></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakcmstkeyent.htm" title="You type the keyword entries that define display files in positions 45 through 80 (functions).">DDS keyword entries for display files (positions 45 through 80)</a></div>
</div>
</div>
</body>
</html>