Pathway/iTS TCP and Terminal Programming Guide

Processing Double-Byte Character Sets
Compaq NonStop™ Pathway/iTS TCP and Terminal Programming Guide426751-001
8-2
Determination of the Character Set
In general, an IBM device must have double-byte character set (DBCS) capability,
as defined in the IBM 3270 Information System Data Stream Programmer's
Reference, to support the processing of double-byte characters.
Determination of the Character Set
By default, your Pathway application uses the character set supported by the device.
The default double-byte character set is determined as follows:
For 3270 devices connected by the SNAX/XF subsystem, call SETMODE 144 to
determine the character set.
For 3270 devices connected by other access methods, the default character set is
IBM-EBCDIC.
For 6530-series terminals, read the device configuration to determine the double-
byte character set.
For both 6530-class devices and 3270-class devices, the program unit is aborted if a
SCREEN COBOL program unit is compiled with the statement CHARACTER-SET IS
KANJI-KATAKANA but the run-time device does not support double-byte characters.
In this case, you get the following error message:
ERROR - *3060* DEVICE DOESN'T SUPPORT DOUBLEBYTE CHARACTERS
Data-Item Considerations
The Compaq NonStopPathway/iTS SCREEN COBOL Reference Manual describes
the SCREEN COBOL programming language that you use to write Pathway
applications. In developing SCREEN COBOL program units with double-byte
characters, you have particular considerations for mixed data items and subscripting.
Mixed Data Items
The Compaq NonStopPathway/iTS SCREEN COBOL Reference Manual discusses
SCREEN COBOL language elements in general. When you develop Pathway
applications for double-byte character sets, you especially need to be aware of mixed
data items.
One-byte characters (Katakana and alphanumeric) and 2-byte (double-byte) characters
can coexist in data items declared as PIC X. Such data items are called mixed data
items. A PIC X(10) field can contain, for example, any of the following combinations
in a mixed data item:
Five 2-byte characters and no 1-byte Katakana or alphanumeric characters
Four 2-byte characters and up to two 1-byte Katakana or alphanumeric characters
Three 2-byte characters and up to four 1-byte Katakana or alphanumeric characters
Two 2-byte characters and up to six 1-byte Katakana or alphanumeric characters