Pathway/iTS TCP and Terminal Programming Guide

Processing Double-Byte Character Sets
Compaq NonStop™ Pathway/iTS TCP and Terminal Programming Guide426751-001
8-12
Data Division
Additional Clause Considerations
The following conventions are checked by the compiler for these screen-field
characteristics clauses. The Compaq NonStopPathway/iTS SCREEN COBOL
Reference Manual discusses each of these clauses fully. A double-byte-only field is a
field that is declared by using only Ns in the PICTURE clause character string.
The ADVISORY clause cannot be associated with a field that allows only double-
byte data.
When a FILL clause is used with a field that allows only double-byte data, the fill
character must be a double-byte character.
When a FILL clause is used with a PIC X or PIC A field, the fill literal must be a
valid ASCII (single-byte) character.
When the LENGTH clause is used with double-byte fields, the values assigned to
the clause indicate the number of characters of the given type that are required for
operator input. For example, the clause:
LENGTH MUST BE 6
means one of the following:
Six single-byte displayable ASCII characters must be entered for a PIC X(10)
field.
Six single-byte alphabetic ASCII characters must be entered for a PIC A(50)
field.
Six double-byte characters (having a total of 12 bytes) must be entered for a PIC
N(30) screen field.
If you use a mixed field, the LENGTH MUST BE clause refers to the absolute
number of bytes that the operator must enter. For example, PIC A(10)N(5)X(5)
with a LENGTH MUST BE 6 clause means that the operator must enter six
alphabetic characters. A LENGTH MUST BE 11 clause is not possible here
because the operator would have to enter ten alphabetic characters for the first ten
bytes—and half of a double-byte character for the eleventh byte.
The THRU or THROUGH variant of the functions in the same way.
The LENGTH value for a screen field must be 256 or less.
The THRU or THROUGH variant of the MUST BE clause is supported for fields
that allow only double-byte data in the same way as it is in the Working-Storage
Section.
You can use the THRU/THROUGH with 88-level data items associated with
double-byte character set literals. Byte-by-byte comparisons of all items in the
THRU/THROUGH are performed.