ibm-information-center/dist/eclipse/plugins/i5OS.ic.dm_5.4.0.1/rbal3specdata.htm

83 lines
5.7 KiB
HTML
Raw Permalink Normal View History

2024-04-02 14:02:31 +00:00
<?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="copyright" content="(C) Copyright IBM Corporation 2005" />
<meta name="DC.rights.owner" content="(C) Copyright IBM Corporation 2005" />
<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="concept" />
<meta name="DC.Title" content="Specify data for different field types and attributes" />
<meta name="abstract" content="You can use FMTOPT(*MAP) to map data between fixed-length and variable-length fields and between variable-length fields with different maximum lengths." />
<meta name="description" content="You can use FMTOPT(*MAP) to map data between fixed-length and variable-length fields and between variable-length fields with different maximum lengths." />
<meta name="DC.Relation" scheme="URI" content="rbal3copydbmbrfmt.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal3map.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal3mapfix.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal3dt.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal3nullcap.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal3ufmt.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal3ptr2.htm" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbal3specdata" />
<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>Specify data for different field types and attributes</title>
</head>
<body id="rbal3specdata"><a name="rbal3specdata"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Specify data for different field types and attributes</h1>
<div><p>You can use FMTOPT(*MAP) to map data between fixed-length and variable-length
fields and between variable-length fields with different maximum lengths.</p>
<p>When mapping a variable-length field with a length of zero
to a variable-length to-field, the to-field length is set to zero.</p>
<p>When mapping a variable-length field with a length of zero
to a fixed-length to-field, the to-field is filled with single-byte blanks
(<span>X'40'</span>), unless the to-field is a DBCS-only field. A DBCS-only to-field
is set to <span>X'4040'</span>s and surrounded by shift-out and shift-in (SO-SI)
characters.</p>
<p>When mapping variable-length fields to variable-length fields
and the from-field does not have a length of zero and graphic fields are not
being mapped to or from bracketed DBCS fields, the following action happens:</p>
<ul><li>If the from-field data length is less than or equal to the maximum length
of the to-field, the length of a variable-length from-field is copied to a
variable-length to-field.</li>
<li>If the from-field data length is greater than the maximum length of the
to-field, the data of the from-field is truncated to the maximum length of
the to-field, and the to-field length is set to its maximum length.
The data is truncated in a manner that ensures data integrity.</li>
</ul>
<div class="note"><span class="notetitle">Note:</span> In the examples, x represents a blank, &lt; represents the shift-out
character, and &gt; represents the shift-in character. The 2-byte length is
actually a binary number shown as a character to make the example readable.</div>
<div class="fignone"><br /><img src="rv2h082.gif" alt="Example of mapping from and&#xA;to variable-length fields" /><br /></div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="rbal3map.htm">Map variable-length fields to fixed-length fields</a></strong><br />
</li>
<li class="ulchildlink"><strong><a href="rbal3mapfix.htm">Map fixed-length fields to variable-length fields</a></strong><br />
</li>
<li class="ulchildlink"><strong><a href="rbal3dt.htm">Date, time, and timestamp fields using FMTOPT(*MAP) or FMTOPT(*NOCHK)</a></strong><br />
</li>
<li class="ulchildlink"><strong><a href="rbal3nullcap.htm">Null-capable fields using FMTOPT(*MAP) or FMTOPT(*NOCHK)</a></strong><br />
</li>
<li class="ulchildlink"><strong><a href="rbal3ufmt.htm">CCSIDs using FMTOPT(*MAP) or FMTOPT(*NOCHK)</a></strong><br />
</li>
<li class="ulchildlink"><strong><a href="rbal3ptr2.htm">DBCS-graphic fields using FMTOPT(*MAP) or FMTOPT(*NOCHK)</a></strong><br />
</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbal3copydbmbrfmt.htm" title="When you copy from a database file to a database file, you must use the FMTOPT parameter if the record formats are not identical or if the files are different types (source or data). If either file is a device file or inline data file, the FMTOPT parameter does not apply. The records are truncated or padded with blanks or zeros when record lengths are different. A message is sent if the records are truncated.">Copying between different database record formats (FMTOPT parameter)</a></div>
</div>
</div>
</body>
</html>