ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzakb_5.4.0.1/dbclen.htm

62 lines
3.9 KiB
HTML
Raw 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="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="Length (positions 30 through 34)" />
<meta name="abstract" content="The length of a field containing bracketed-DBCS data can range from 4 through 32 766 bytes (4 through 32 740 bytes if the field is variable length). The length of a DBCS-graphic field can range from 1 through 16 383 characters (1 through 16 370 characters if the field is variable length)." />
<meta name="description" content="The length of a field containing bracketed-DBCS data can range from 4 through 32 766 bytes (4 through 32 740 bytes if the field is variable length). The length of a DBCS-graphic field can range from 1 through 16 383 characters (1 through 16 370 characters if the field is variable length)." />
<meta name="DC.Relation" scheme="URI" content="dbpos.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="dbclen" />
<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>Length (positions 30 through 34)</title>
</head>
<body id="dbclen"><a name="dbclen"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Length (positions 30 through 34)</h1>
<div><p>The length of a field containing bracketed-DBCS data can range
from 4 through 32 766 bytes (4 through 32 740 bytes if the field
is variable length). The length of a DBCS-graphic field can range from 1 through
16 383 characters (1 through 16 370 characters if the field is variable
length).</p>
<div class="section"><div class="p">When determining the length of a field containing
DBCS data, consider the following rules: <ul><li>Each DBCS character is 2 bytes long.</li>
<li>For DBCS-graphic fields, the length of the field is specified in the number
of DBCS characters.</li>
<li>Include both shift-control characters in the length of the field for fields
with a data type of J, E, or O. Together, these characters are 2 bytes long.</li>
<li>Fields specified with the J or E data type must have an even
length.</li>
</ul>
</div>
<div class="p">For example, a bracketed-DBCS field that contains up to 3 DBCS
characters, 1 shift-in character, and 1 shift-out character, has 8 bytes of
data: <pre>(3 characters x 2 bytes) + (shift-out + shift-in) = 8</pre>
</div>
<div class="p">A
DBCS-graphic field that contains up to 3 DBCS characters has 6 bytes of data:
<pre>(3 characters x 2 bytes) = 6</pre>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dbpos.htm" title="These topics describe DBCS considerations for the length, data type, and decimal positional entries on database files. Positional entries that are not mentioned have no special considerations for DBCS.">Positional entry considerations for database files that use DBCS</a></div>
</div>
</div>
</body>
</html>