DDS for printer files
The following section describes, by position, DDS for describing printer
files. Positions that are not mentioned have no special considerations
for UTF-16. In these topics, UTF-16 also implies UCS-2.
Length (positions 30 through 34):
Specify the length of the field in these positions. The length of a
field containing UTF-16 data can range from 1 through 16 383 code
units.
When determining the program length of a field containing UTF-16 data,
consider the following:
- Each UTF-16 code unit is 2 bytes long.
- Specify the program length of the field as the number of UTF-16 code units
(count surrogate pairs as two code units). For example, a field
containing 3 UTF-16 code units has 6 bytes of data.
- The field's default print length is equal to the field's program
length, or 2 times the number of UTF-16 code units.
- After converting between UTF-16 data and EBCDIC, the resulting data may be
equal to, longer than or shorter than the original length data. This
depends upon the target CCSID specified on the CHRID parameter of the printer
file. For example, 1 UTF-16 code unit consists of 2 bytes of
data. That code unit may convert to 1 SBCS character composed of 1 byte
of data, 1 graphic-DBCS character composed of 2 bytes of data, or 1 bracketed
DBCS character composed of 4 bytes of data.
- You can use the alternate-field-length parm on the CCSID keyword to
specify the field's print length separately from the program
length.
Data type (position 35):
The only valid data type for UTF-16 data is the G data type.
- G (Graphic)
- Type G in combination with the CCSID keyword to specify that this field
contains UTF-16 data.
Normally, the field would contain graphic-DBCS data if you specified
G. In combination with the CCSID keyword, however, the field now
contains UTF-16 data.
Decimal positions (positions 36 and 37):
Leave these positions blank when using UTF-16 data.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.