ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzakc_5.4.0.1/rzakcmstdfusc2.htm

173 lines
9.1 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="CCSID (Coded Character Set Identifier) keyword" />
<meta name="abstract" content="You use this file-, record-, or field-level keyword to specify that a G-type field supports Unicode data instead of DBCS-graphical data. Like DBCS-graphic characters, Unicode code units are two bytes long." />
<meta name="description" content="You use this file-, record-, or field-level keyword to specify that a G-type field supports Unicode data instead of DBCS-graphical data. Like DBCS-graphic characters, Unicode code units are two bytes long." />
<meta name="DC.subject" content="CCSID (Coded Character Set Identifier) keyword, UCS-2 level 1, UCS-2 level 1, CCSID (Coded Character Set Identifier) keyword" />
<meta name="keywords" content="CCSID (Coded Character Set Identifier) keyword, UCS-2 level 1, UCS-2 level 1, CCSID (Coded Character Set Identifier) keyword" />
<meta name="DC.Relation" scheme="URI" content="ucs2kwd.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="rzakcmstdfusc2" />
<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>CCSID (Coded Character Set Identifier) keyword</title>
</head>
<body id="rzakcmstdfusc2"><a name="rzakcmstdfusc2"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">CCSID (Coded Character Set Identifier) keyword</h1>
<div><p>You use this file-, record-, or field-level keyword to specify
that a G-type field supports Unicode data instead of DBCS-graphical data.
Like DBCS-graphic characters, Unicode code units are two bytes long.</p>
<div class="section"><div class="p">The format of the keyword is: <pre>CCSID(Unicode-CCSID | &amp;Unicode-CCSID-field | *REFC
[field-display-length | *MIN | *LEN display-positions])</pre>
</div>
<p>The
Unicode-CCSID parameter is required. Use the Unicode-CCSID parameter to specify
a CCSID that uses a Unicode encoding scheme for this field. The Unicode-CCSID
parameter can be specified either as a number up to 5 digits long or as a
program-to-system field. You must define the program-to-system field with
a length of 5 and with the S data type.</p>
<p>A special value of *REFC can
be specified instead of a Unicode-CCSID value. It is valid only on reference
fields, and the referenced field must be coded with a CCSID keyword specifying
a Unicode-CCSID value. Normally, the display file CCSID keyword will override
any CCSID keyword attributes taken from the referenced field. If *REFC is
specified, the Unicode-CCSID value is taken from the referenced field.</p>
<p>The
field-display-length parameter is optional and is valid only when the CCSID
keyword you specify it at the field level. You specify the field-display-length
as the number of Unicode code units.</p>
<p>When Unicode data is involved in
an output operation, the data is converted from the associated Unicode CCSID
to the CCSID of the device. Generally, the length of the data will change
when this conversion occurs. Therefore, you can use the field-display-length
value to specify a displayed field length that is different from the default
displayed field length. The default displayed field length of a 'G' data type
field is twice the number of code units that are specified for the field length.</p>
<p>The
field-display-length value can help avoid truncation of field data when the
data length will be longer after conversion than the default displayed field
length. The field-display-length value can also help increase the available
line space by limiting the displayed field length when the data length will
be shorter after conversion. The field length will still be used to define
the field's output buffer length.</p>
<div class="p">For example, a display file contains
the following line: <pre>FLD1 10G B 2 2 CCSID(X Y)</pre>
<ul><li>X is the Unicode-CCSID associated with the field data. Y is the field-display-length
of this field. If you do not specify Y, then FLD1's length on the screen is
20 single-byte characters (twice the number of code units specified on the
field length).</li>
<li>If you know that the Unicode data is constructed from single byte data,
then you can specify the field-display-length, Y, as 5 Unicode code units.
FLD1 will have a length of 10 single byte characters on the screen (twice
the number of code units that are specified on the field-display-length).</li>
<li>If you know that the Unicode data is constructed from double-byte data,
then you can specify the field-display-length, Y, as 11 Unicode
code units. FLD1 will have a length of 22 single byte characters on the screen.
This will allow space for the shift-out and shift-in characters.</li>
</ul>
</div>
<p>A special value, *MIN, can be specified instead of a field-display-length.
This value will be used to specify a field length defined in terms of display
positions. This value causes the field length on the screen to be equal to
the number of Unicode code units defined in the DDS.</p>
<p>A special value,
*LEN, along with a display-positions value can be specified instead of a field-display-length.
This value is used to specify a field length defined in terms of display positions.
This value causes the field length on the screen to be equal to the display-positions
value.</p>
<p>If the CCSID keyword is specified at both the field-level and
the record- or file-level, the field-level keyword takes precedence.</p>
<p>On
output, field data that is longer than the specified field length is truncated.
On input, if too many characters were entered into the Unicode field, then
the field is reverse imaged and an error appears on the error line stating
too many characters were entered. You need to press reset and correct the
field. The maximum number of characters to enter is conveyed in the error
message.</p>
<p>The CCSID keyword can be specified with all of the following
field level keywords:</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="void" border="0" rules="none"><tbody><tr><td valign="top" width="33.33333333333333%"><p>ALIAS<br />
AUTO(RA)<br />
BLANKS<br />
CHANGE<br />
COLOR<br />
DFT<br />
DLTCHK<br />
DSPRL<br />
DUP<br />
CHECK(FE)<br />
CHGINPDFT</p>
</td>
<td valign="top" width="33.33333333333333%"><p>DFTVAL<br />
DSPATR(BL)<br />
DSPATR(CS)<br />
DSPATR(HI)<br />
DSPATR(MDT)<br />
DSPATR(ND)<br />
DSPATR(PC)<br />
DSPATR(PR)<br />
DSPATR(RI)<br />
DSPATR(UL)<br />
ENTFLDATR</p>
</td>
<td valign="top" width="33.33333333333333%"><p>ERRMSG<br />
ERRMSGID<br />
FLDCSRPRG<br />
INDTXT<br />
OVRATR<br />
OVRDTA<br />
PUTRETAIN<br />
REFFLD<br />
SFLCSRPRG<br />
TEXT</p>
</td>
</tr>
</tbody>
</table>
</div>
<p>Option indicators are not valid for this keyword.</p>
</div>
<div class="section"><h4 class="sectiontitle">Example</h4><p>The following example shows how to specify
the CCSID keyword.</p>
</div>
<div class="example"> <pre>|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A CCSID(13488)
00020A R RECORD1
00030A FIELD1 30G
00040A FIELD2 10G CCSID(61952 6)
00050A R RECORD2 CCSID(1200)
00060A FIELD3 20G
00070A R RECORD3
00080A FIELD4 10G CCSID(61952 *MIN)
00090A FIELD6 10G CCSID(1200 *LEN 8)</pre>
<p>FIELD1
is assigned a CCSID value of 13488. FIELD2 is assigned a CCSID value of 61952
and has a field length of 6 Unicode code units long (12 SBCS characters).
FIELD3 is assigned a CCSID value of 1200. FIELD4 will use 10 display positions
on the screen. FIELD6 will use 8 display positions on the screen.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="ucs2kwd.htm" title="The DFT keyword can contain SBCS, bracketed-DBCS, or bracketed-DBCS-graphic character strings when specified on a Unicode-capable field.">Keyword considerations for display files that use Unicode data (positions 45 through 80)</a></div>
</div>
</div>
</body>
</html>