ibm-information-center/dist/eclipse/plugins/i5OS.ic.dbp_5.4.0.1/rbafodbcscon.htm

106 lines
7.3 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="concept" />
<meta name="DC.Title" content="DBCS field concatenation" />
<meta name="abstract" content="When fields are concatenated, the data types can change (the resulting data type is automatically determined by the system). You can follow these guidelines when double-byte character set (DBCS) fields are concatenated." />
<meta name="description" content="When fields are concatenated, the data types can change (the resulting data type is automatically determined by the system). You can follow these guidelines when double-byte character set (DBCS) fields are concatenated." />
<meta name="DC.subject" content="double-byte character set (DBCS), field, concatenating, DBCS (double-byte character set), concatenating, DBCS" />
<meta name="keywords" content="double-byte character set (DBCS), field, concatenating, DBCS (double-byte character set), concatenating, DBCS" />
<meta name="DC.Relation" scheme="URI" content="rbafoappdbcs.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafoqryoc.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbafodbcscon" />
<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>DBCS field concatenation</title>
</head>
<body id="rbafodbcscon"><a name="rbafodbcscon"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">DBCS field concatenation</h1>
<div><p>When fields are concatenated, the data types can change (the resulting
data type is automatically determined by the system). You can follow these
guidelines when double-byte character set (DBCS) fields are concatenated.</p>
<div class="p"><ul><li>The operating system assigns the data type based on the data
types of the fields that are being concatenated. When DBCS fields are included
in a concatenation, the general rules are: <ul><li>If the concatenation contains one or more hexadecimal (H) fields, the
resulting data type is hexadecimal (H).</li>
<li>If all fields in the concatenation are DBCS-only (J), the resulting data
type is DBCS-only (J).</li>
<li>If the concatenation contains one or more DBCS (O, E, J) fields, but no
hexadecimal (H) fields, the resulting data type is DBCS open (O).</li>
<li>If the concatenation contains two or more DBCS open (O) fields, the resulting
data type is a variable-length DBCS open (O) field.</li>
<li>If the concatenation contains one or more variable-length fields of any
data type, the resulting data type is variable length.</li>
<li>A DBCS-graphic (G) field can be concatenated only to another DBCS-graphic
field. The resulting data type is DBCS-graphic (G).</li>
<li>A UCS2-graphic (G) field can be concatenated to another UCS2-graphic field,
a UTF-8 character field, or a UTF-16 graphic field. The resulting data type
is UTF-16 if one of the operands is UTF-16, UTF-8 if one of the operands is
UTF-8 and no operands are UTF-16, and otherwise UCS-2.</li>
<li>A UTF-8 character (A) field can be concatenated with another UTF-8 field,
a UTF-16 field, or a UCS-2 field. The resulting data type is UTF-16 if one
of the operands is UTF-16, UTF-8 if one of the operands is UTF-8 and no operands
are UTF-16, and otherwise UCS-2.</li>
<li>A UTF-16 graphic (G) field can be concatenated with another UTF-16 field,
a UTF-8 field, or a UCS-2 field. The resulting data type is UTF-16 if one
of the operands is UTF-16, UTF-8 if one of the operands is UTF-8 and no operands
are UTF-16, and otherwise UCS-2.</li>
</ul>
</li>
<li>The maximum length of a concatenated field varies depending on the data
type of the concatenated field and length of the fields being concatenated.
If the concatenated field is zoned decimal (S), its total length cannot exceed
31 bytes. If the concatenated field is character (A), DBCS-open (O), or DBCS-only
(J), its total length cannot exceed 32,766 bytes (32,740 bytes if the field
is variable length). <p>The length of DBCS-graphic (G) fields is expressed
as the number of double-byte <em>characters</em> (the actual length is twice
the number of characters); therefore, the total length of the concatenated
field cannot exceed 16,383 characters (16,370 characters if the field is variable
length).</p>
</li>
<li>In join logical files, the fields to be concatenated must be from the
same physical file. The first field specified on the CONCAT keyword identifies
which physical file is used. The first field must, therefore, be unique among
the physical files on which the logical file is based, or you must also specify
the JREF keyword to specify which physical file to use.</li>
<li>The use of a concatenated field must be I (input only).</li>
<li>REFSHIFT cannot be specified on a concatenated field that has been assigned
a data type of O or J.</li>
</ul>
<div class="note"><span class="notetitle">Notes:</span> <ol><li>When bracketed-DBCS fields are concatenated, a shift-in at the end of
one field and a shift-out at the beginning of the next field are removed.
If the concatenation contains one or more hexadecimal fields, the shift-in
and shift-out pairs are only eliminated for DBCS fields that precede the first
hexadecimal field.</li>
<li>A concatenated field that contains DBCS fields must be an input-only field.</li>
<li>Resulting data types for concatenated DBCS fields might differ when using
The Open Query File (OPNQRYF) command.</li>
</ol>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafoappdbcs.htm" title="These topics describe double-byte character set (DBCS) considerations as they apply to the database on the iSeries system.">Double-byte character set considerations</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="rbafoqryoc.htm" title="When using the Open Query File (OPNQRYF) concatenation function, the i5/OS licensed program assigns the resulting data type based on the data types of the fields being concatenated. When double-byte character set (DBCS) fields are included in a concatenation, the resulting data type is generally the same as concatenated fields in a logical file, with some slight variations.">Use concatenation with DBCS fields through the Open Query File (OPNQRYF) command</a></div>
</div>
</div>
</body>
</html>