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

94 lines
5.6 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="Keyword considerations (positions 45 through 80)" />
<meta name="abstract" content="Learn about how Unicode data is used with some DDS keywords." />
<meta name="description" content="Learn about how Unicode data is used with some DDS keywords." />
<meta name="DC.Relation" scheme="URI" content="ucs2ap.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="ucs2kwd" />
<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>Keyword considerations (positions 45 through 80)</title>
</head>
<body id="ucs2kwd"><a name="ucs2kwd"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Keyword considerations (positions 45 through 80)</h1>
<div><p>Learn about how Unicode data is used with some DDS keywords.</p>
<div class="section"><p>The CCSID keyword is used to enable an A-type or G-type field
to contain Unicode data.</p>
<p>The CCSID parameter must have a CCSID using
a Unicode encoding scheme. This keyword is enabled for both physical and logical
files.</p>
<div class="p">For logical files, the following characteristics must be true
before the CCSID keyword is allowed on a logical file field. <ul><li>If the specified value on the logical file CCSID keyword uses Unicode
encoding schemes, the field data type must be A for UTF-8 or G for UCS-2/UTF-16.
Also, the corresponding physical file field must be of types A, G, or O. If
the CCSID keyword is specified on the physical file field, it must contain
a value other than 65 535.</li>
<li>If the specified value on the logical file CCSID keyword does not use
Unicode encoding schemes, the field data type must be A, O, or G. Also, the
corresponding physical file field must be a Unicode field. The CCSID keyword
specified on the logical file field must contain a value other than 65 535.</li>
</ul>
</div>
<p>The DFT keyword can contain SBCS, bracketed-DBCS, or bracketed-DBCS-graphic
character strings when specified on a Unicode-capable field.</p>
<p>You can
use the COMP keyword only to compare data in another Unicode-capable field.
Two equal length UTF-8 data strings can be compared to each other using their
hex values regardless of character boundaries.</p>
<p>You can specify a character
literal on a select or omit field that is tagged with a Unicode CCSID on the
COMP, RANGE, and VALUES keywords. The maximum length of the literal is equal
to the number of Unicode code units that is defined in positions 30 to 34
of the DDS specification.</p>
<p>The VARLEN keyword can be used on Unicode
fields.</p>
<p>Logical files can have UTF-8 and UTF-16 data keys.</p>
</div>
<div class="section"><h4 class="sectiontitle">Concatenation of Unicode fields</h4><p>Unicode fields can
be used in the CONCAT keyword. The following rules apply:</p>
<ul><li>The parameters of the CONCAT keyword can be UCS-2 graphic fields, UTF-16
fields, or a mix of each type. No other field types can be concatenated with
UCS-2 or UTF-16 fields. <ul><li>The concatenation result is UTF-16 if one of the parameters is UTF-16.</li>
<li>Otherwise, the result is UCS-2.</li>
</ul>
</li>
<li>A UTF-8 field can be concatenated only with other UTF-8 fields. No other
field type is allowed to be concatenated with a UTF-8 field. The concatenation
result is UTF-8.</li>
<li>The resulting field must be an input-only field; use <strong>I</strong> in position
38 of the DDS source statement.</li>
</ul>
</div>
<div class="section"><h4 class="sectiontitle">Join logical file support</h4><p>A UTF-8 field can be joined
to another UTF-8 field in a join logical file. UTF-16 fields can be joined.
To join a UTF-8 or UTF-16 field to a CHAR field, for example, the UTF-8, UTF-16,
or CHAR field must be redefined in the logical file to the same type field.</p>
</div>
<div class="section"><h4 class="sectiontitle">Select/Omit fields in logical files</h4><p>UTF-8 and UTF-16
fields are allowed as select and omit field specifications.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="ucs2ap.htm" title="Unicode is a universal encoding scheme for written characters and text that enables the exchange of data internationally. Follow this topic to learn about how to specify DDS position 30 through 37 and position 45 through 80 for describing database files. Positions not mentioned have no special considerations for Unicode.">Unicode considerations for database files</a></div>
</div>
</div>
</body>
</html>