Pathway/iTS TCP and Terminal Programming Guide
Processing Double-Byte Character Sets
Compaq NonStop™ Pathway/iTS TCP and Terminal Programming Guide—426751-001
8-8
Data Division
•
Data items declared as PIC N in the Screen Section must declare the PIC N attribute
before all other attributes:
SCREEN SECTION.
:
05 FIELD-10 AT 10, 20 PIC N
MUST BE ....
FILL ....
USING WS-FIELD-10.
•
The length of a double-byte-only data item can be 128 double-byte characters for a
Screen Section entry. Each double-byte character occupies two bytes per data item
in memory, for a maximum of 256 bytes.
•
Unlike the Working-Storage Section and the Linkage Section, the Screen Section
allows data items with mixed character-string symbols. A data field that uses the
double-byte character-string symbol, N, can be combined with data types X, A, 9, 0,
and B.
REDEFINES Clause
In addition to the general rules that the Compaq NonStop™ Pathway/iTS SCREEN
COBOL Reference Manual outlines for the REDEFINES clause, there are special
considerations for using it when you develop a Pathway application for double-byte
character sets.
Working-Storage Section
The REDEFINES clause in the Working-Storage Section of the Data Division allows
the same computer storage area to be described in more than one way. The
REDEFINES clause specifies that the storage area being defined is an alternate
interpretation of a previously defined storage area:
If you try to move a numeric field, a numeric edited field, a numeric noninteger, or a
numeric literal to a PIC N data item, you get a syntax error. By redefining the double-
byte-only PIC N field as an alphanumeric PIC X data item, you can make the move. For
example:
WORKING-STORAGE SECTION.
:
01 WS-KANJI-ONLY-FLD PIC N(10).
01 WS-KANJI-TO-PICX-REDEF REDEFINES WS-KANJI-ONLY-FLD PIC X(20).
Only Screen Section data items may be defined as alphanumeric edited.
REDEFINES data-name-2