Pathway/iTS TCP and Terminal Programming Guide

Processing Double-Byte Character Sets
Compaq NonStop™ Pathway/iTS TCP and Terminal Programming Guide426751-001
8-5
Environment Division
CHARACTER-SET IS Statement
The character-set-type provides support of national-use characters, that is, character sets
that are not USASCII. The Compaq NonStopPathway/iTS SCREEN COBOL
Reference Manual lists the available character sets. To specify a double-byte character
set, you use the keyword KANJI-KATAKANA:
The KANJI-KATAKANA keyword indicates that the program source file can contain
double-byte characters in data fields or literals. It instructs the compiler to allow the
PIC N PICTURE clause described later in this section.
The following rules govern the use of the KANJI-KATAKANA keyword:
The PIC N data type is supported only for program units that specify
CHARACTER-SET IS KANJI-KATAKANA.
Program units that do not use double-byte characters need not specify
CHARACTER-SET IS KANJI-KATAKANA even if 1-byte Katakana characters
are used.
If a program unit specifies CHARACTER-SET IS KANJI-KATAKANA, both 1-
byte and 2-byte Katakana character sets are supported; you can use whichever
Katakana character set the device supports.
Depending on the terminal, support for 1-byte Katakana characters, 2-byte Katakana
characters, and alphabetic characters varies:
Applications that use only 1-byte alphabetic characters can run on any device for
which the CHARACTER-SET IS KANJI-KATAKANA clause is valid.
Applications that use 1-byte alphabetic characters as well as 1-byte Katakana
characters can run only on 6530 Katakana terminals, on 6530 Kanji terminals, or on
IBM 3270 terminals configured to support EBCDIC-Katakana.
On 6530 Kanji terminals, both 1-byte and 2-byte Katakana character sets, as well as
uppercase and lowercase alphabetic characters, are supported.
IBM 3270 terminals support uppercase alphabetic characters with either lowercase
alphabetic characters or 1-byte Katakana characters.
On IBM 3270 terminals configured to use both lowercase and uppercase
alphabetic characters, a program unit cannot use 1-byte Katakana characters.
For IBM 3270 terminals configured to use 1-byte Katakana characters, the data
stream conversion function of the TCP upshifts lowercase alphabetic characters
in the outbound data stream. Such terminals can run applications with both
lowercase and uppercase alphabetic characters as well as 1-byte Katakana
characters. Inbound data from these devices does not contain lowercase
alphabetic characters.
[CHARACTER-SET IS KANJI-KATAKANA]
Note. The SCREEN COBOL compiler does not allow the use of double-byte characters as
program names (for instance, paragraph names or variable names).