ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahh_5.4.0.1/lengthprecisionrelative.htm

144 lines
8.9 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="Values for length and precision" />
<meta name="abstract" content="Values for the length and precision attributes are different for different data types." />
<meta name="description" content="Values for the length and precision attributes are different for different data types." />
<meta name="DC.Relation" scheme="URI" content="pcmldttg.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="lengthprecisionrelative" />
<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>Values for length and precision</title>
</head>
<body id="lengthprecisionrelative"><a name="lengthprecisionrelative"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Values for length and precision</h1>
<div><p>Values for the length and precision attributes are different for
different data types. </p>
<div class="section"><p>The following table lists each data type with a description of
the possible values for length and precision.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="border" border="1" rules="all"><thead align="left"><tr class="tablemainheaderbar"><th valign="top" width="33.33333333333333%" id="d0e22">Data type</th>
<th valign="top" width="33.33333333333333%" id="d0e24">Length</th>
<th valign="top" width="33.33333333333333%" id="d0e26">Precision</th>
</tr>
</thead>
<tbody><tr><td valign="top" width="33.33333333333333%" headers="d0e22 "><samp class="codeph"><strong>type</strong>="char"</samp></td>
<td valign="top" width="33.33333333333333%" headers="d0e24 ">The number of bytes of data for this element, which is not necessarily
the number of characters. You must specify either a literal <em>number</em> or
a <em> data-name</em>.</td>
<td valign="top" width="33.33333333333333%" headers="d0e26 ">Not applicable</td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e22 "><samp class="codeph"><strong>type</strong>="int"</samp></td>
<td valign="top" width="33.33333333333333%" headers="d0e24 ">The number of bytes of data for this element: <samp class="codeph">2</samp>, <samp class="codeph">4</samp>,
or <samp class="codeph">8</samp>. You must specify a literal <em>number</em>.</td>
<td valign="top" width="33.33333333333333%" headers="d0e26 "><p>Indicates the number of bits of precision and whether the integer
is signed or unsigned:</p>
<ul><li>For <samp class="codeph"><strong>length</strong>="2"</samp> <ul><li>Use <samp class="codeph"><strong>precision</strong>="15"</samp> for a signed 2-byte integer.
This is the default value</li>
<li>Use <samp class="codeph"><strong>precision</strong>="16"</samp> for an unsigned 2-byte integer</li>
</ul>
</li>
<li>For <samp class="codeph"><strong>length</strong>="4"</samp> <ul><li>Use <samp class="codeph"><strong>precision</strong>="31"</samp> for a signed 4-byte integer</li>
<li>Use <samp class="codeph"><strong> precision</strong>="32"</samp> for an unsigned 4-byte integer</li>
</ul>
</li>
<li>For <samp class="codeph"><strong>length</strong>="8"</samp> use <samp class="codeph"><strong>precision</strong>="63"</samp>
for a signed 8-byte integer</li>
</ul>
</td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e22 "><samp class="codeph"><strong>type</strong>="packed"</samp> or <samp class="codeph">"zoned"</samp></td>
<td valign="top" width="33.33333333333333%" headers="d0e24 ">The number of numeric digits of data for this element. You must specify
a literal <em>number</em>.</td>
<td valign="top" width="33.33333333333333%" headers="d0e26 ">The number of decimal digits for the element. This number must be
greater than or equal to zero and less than or equal to the total number
of digits specified on the <strong>length</strong> attribute.</td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e22 "><samp class="codeph"><strong>type</strong>="float"</samp></td>
<td valign="top" width="33.33333333333333%" headers="d0e24 ">The number of bytes, <samp class="codeph">4</samp> or <samp class="codeph">8</samp>, of
data for this element. You must specify a literal <em>number</em>.</td>
<td valign="top" width="33.33333333333333%" headers="d0e26 ">Not applicable</td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e22 "><samp class="codeph"><strong>type</strong>="byte"</samp></td>
<td valign="top" width="33.33333333333333%" headers="d0e24 ">The number of bytes of data for this element. You must specify either
a literal <em>number</em> or <em> data-name</em>.</td>
<td valign="top" width="33.33333333333333%" headers="d0e26 ">Not applicable<em></em> </td>
</tr>
<tr><td valign="top" width="33.33333333333333%" headers="d0e22 "><samp class="codeph"><strong>type</strong>="struct"</samp></td>
<td valign="top" width="33.33333333333333%" headers="d0e24 ">Not allowed.</td>
<td valign="top" width="33.33333333333333%" headers="d0e26 ">Not applicable</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="lengthprecisionrelative__resolvingrelativenames"><a name="lengthprecisionrelative__resolvingrelativenames"><!-- --></a><h4 class="sectiontitle">Resolving relative names</h4><p>Several
attributes allow you to specify the name of another element, or tag, within
the document as the attribute value. The name specified can be a name that
is relative to the current tag.</p>
<p>Names are resolved by seeing if the
name can be resolved as a child or descendent of the tag containing the current
tag. If the name cannot be resolved at this level, the search continues with
the next highest containing tag. This resolution must eventually result in
a match of a tag that is contained by either the <strong>&lt;pcml&gt;</strong> tag or
the &lt;<strong>rfml</strong>&gt; tag, in which case the name is considered to be an
absolute name, not a relative name.</p>
<p>Here is an example using PCML:</p>
<pre>&lt;pcml version="1.0"&gt;
&lt;program name="polytest" path="/QSYS.lib/MYLIB.lib/POLYTEST.pgm"&gt;
&lt;!-- Parameter 1 contains a count of polygons along with an array of polygons --&gt;
&lt;struct name="parm1" usage="inputoutput"&gt;
&lt;data name="nbrPolygons" type="int" length="4" init="5" /&gt;
&lt;!-- Each polygon contains a count of the number of points along with an array of points --&gt;
&lt;struct name="polygon" count="nbrPolygons"&gt;
&lt;data name="nbrPoints" type="int" length="4" init="3" /&gt;
&lt;struct name="point" count="nbrPoints" &gt;
&lt;data name="x" type="int" length="4" init="100" /&gt;
&lt;data name="y" type="int" length="4" init="200" /&gt;
&lt;/struct&gt;
&lt;/struct&gt;
&lt;/struct&gt;
&lt;/program&gt;
&lt;/pcml&gt;</pre>
<p>Here is an example using RFML:</p>
<pre>&lt;rfml version="4.0"&gt;
&lt;struct name="polygon"&gt;
&lt;!-- Each polygon contains a count of the number of points along with an array of points. --&gt;
&lt;data name="nbrPoints" type="int" length="4" init="3" /&gt;
&lt;data name="point" type="struct" struct="point" count="nbrPoints" /&gt;
&lt;/struct&gt;
&lt;struct name="point" &gt;
&lt;data name="x" type="int" length="4" init="100" /&gt;
&lt;data name="y" type="int" length="4" init="200" /&gt;
&lt;/struct&gt;
&lt;recordformat name="polytest"&gt;
&lt;!-- This format contains a count of polygons along with an array of polygons --&gt;
&lt;data name="nbrPolygons" type="int" length="4" init="5" /&gt;
&lt;data name="polygon" type="struct" struct="polygon" count="nbrPolygons" /&gt;
&lt;/recordformat&gt;
&lt;/rfml&gt;</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="pcmldttg.htm" title="The PCML data tag can have the following attributes.">PCML data tag</a></div>
</div>
</div>
</body>
</html>