Pathway/iTS TCP and Terminal Programming Guide
Processing Double-Byte Character Sets
Compaq NonStop™ Pathway/iTS TCP and Terminal Programming Guide—426751-001
8-9
Data Division
Screen Section
In the Screen Section of the Data Division, the REDEFINES clause allows the same
screen field to be described in more than one way. The REDEFINES clause specifies
that the screen field being defined is an alternate interpretation of a previously defined
field:
IBM 3270 terminals have a limitation that affects the use of Screen Section
redefinitions. PIC N fields on IBM devices allow only double-byte character set data;
no single-byte data—including shift-out/shift-in characters—is allowed.
When you are redefining data items for Pathway applications that run on IBM 3270
devices, you must remember the following:
•
A PIC N field implies that no single-byte characters are to be found in the data
stream.
•
A PIC X field is a mixed field. It can contain double-byte and single-byte
characters. Double-byte character set substrings contained within a mixed field
must be bracketed by SO/SI characters.
The data type of the field used in the operation determines the translation to be applied
to the field and also the way the field is defined on the terminal. Translation is
automatically done by the TCP, based on the field and the terminal. The TCP thus adds
or strips shift-out/shift-in characters as needed.
Translation errors can occur if you redefine PIC N data items and then perform a
DISPLAY or ACCEPT of the item by the name specified in the REDEFINES clause.
On output to the terminal, this confusion can generate a terminal error by causing the
TCP to insert SO/SI characters in a field initially defined as PIC N through a DISPLAY
BASE operation. On input, DBCS substrings can appear with SO/SI framing characters
in mixed data items, causing translation errors. A translation error is considered an
editing error.
For instance, a PIC X field redefined as a PIC N results in a display error on the terminal
because the PIC X clause creates a screen field that requires SO/SI insertion for display
of double-byte characters, but the PIC N field used in subsequent DISPLAY writes
double-byte data to the terminal, which does not contain SO/SI characters.
An ACCEPT of the PIC N redefinition causes a translation error because the terminal
transmits double-byte character set data containing SO/SI characters, but the PIC N
definition of the field implies that no single-byte data or SO/SI characters are in the data
stream. Therefore, the translation fails and the TCP reports an editing error to the
operator.
The following subsection, Screen Section Considerations
, discusses the need for SO/SI
characters more fully.
REDEFINES field-name-2