Pathway/iTS TCP and Terminal Programming Guide

Processing Double-Byte Character Sets
Compaq NonStop™ Pathway/iTS TCP and Terminal Programming Guide426751-001
8-7
Data Division
Because variables defined with PIC X can contain mixed data—alphanumeric,
numeric, and double-byte characters—you can combine double-byte characters with
other data types in the Working-Storage Section by defining the entire data item
with PIC X.
If a VALUE clause is declared for a PIC N Working-Storage Section field, the value
can consist only of characters from the Shift-JIS character set enclosed in quotation
marks ("").
You can use the THRU/THROUGH clause with 88-level data items associated with
double-byte character set literals. Byte-by-byte comparisons of all items in the
THRU/THROUGH clause are performed.
Linkage Section
The Linkage Section associates the data items defined in the section with the data items
defined in the Working-Storage Section of the calling program. In developing
applications that use PIC N, consider the following:
Data descriptions defined in the Linkage Section must have the same PIC clause
specifications and use as the corresponding items in the Working-Storage Section.
The length of a double-byte-only data item can be 16,000 characters for a Linkage
Section entry. Each double-byte character occupies two bytes per data item in
memory, for a maximum of 32,000 bytes.
SCREEN COBOL supports the character-string N only in PICTURE clauses that are
not mixed with other character-string symbols. In other words, any data field that
uses the N character-string symbol can have only contiguous Ns as a character-
string symbol in the corresponding PICTURE clause. Only the following N
PICTURE clauses are allowed:
PIC N
PIC N ... N (maximum of 30 contiguous Ns)
PIC N(n) (where n is 1 to 16,000)
Because variables defined with PIC X can contain mixed data—alphanumeric,
numeric, and double-byte characters—you can combine double-byte characters with
other data types in the Linkage Section by defining the entire data item with PIC X.
Screen Section
The PICTURE clause of the Screen Section defines the format in which the data appears
on the terminal screen. In developing applications that use PIC N, consider the
following:
PIC N is valid only in SCREEN COBOL program units that specify the KANJI-
KATAKANA keyword in the CHARACTER SET clause of the OBJECT-
COMPUTER paragraph of the Environment Division.