Pathway/iTS TCP and Terminal Programming Guide
Processing Double-Byte Character Sets
Compaq NonStop™ Pathway/iTS TCP and Terminal Programming Guide—426751-001
8-6
Data Division
Data Division
The Data Division describes the data that a SCREEN COBOL program creates, accepts
as input, manipulates, or produces as input. As explained in the Compaq NonStop™
Pathway/iTS SCREEN COBOL Reference Manual, the Data Division has four sections.
In developing Pathway applications for double-byte character sets, you define specific
attributes in the Working-Storage Section, the Linkage Section, and the Screen Section
of the Data Division. There is no support for double-byte character sets in the Message
Section. Special guidelines for writing the Screen Section of applications that use
double-byte data are discussed in “Screen Section Considerations” later in this section.
PICTURE Clause
The PICTURE clause of the Working-Storage Section, the Linkage Section, and the
Screen Section of the Data Division supports the PIC N data type for double-byte
character sets. The Message Section does not support PIC N.
The PICTURE clause is as follows:
As well as the other character strings described in the Compaq NonStop™ Pathway/iTS
SCREEN COBOL Reference Manual, you can define the character-string N to represent
double-byte characters.
Working-Storage Section
The PICTURE clause of the Working-Storage Section defines the characteristics of an
elementary item. In developing applications that use PIC N, consider the following:
•
PIC N is valid only in program units that specify the KANJI-KATAKANA keyword
in the CHARACTER SET clause of the OBJECT-COMPUTER paragraph of the
Environment Division.
•
The length of a double-byte-only data item can be 16,000 characters for a Working-
Storage 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)
{ PIC } [ IS ] character-string
{ PICTURE }