Pathway/iTS TCP and Terminal Programming Guide

Processing Double-Byte Character Sets
Compaq NonStop™ Pathway/iTS TCP and Terminal Programming Guide426751-001
8-11
Data Division
The TCP does the following when generating fields with possible double-byte characters
that are to be written to a 3270 device:
1. Loads the data into the work buffer
This operation includes all editing operations. It also ensures that the number of
characters placed into the buffer does not exceed the size of the screen field.
2. Calls the appropriate translation routine
Operations performed by the translation routines include the insertion of shift-
out/shift-in characters. As a result of this insertion, the number of characters in the
work buffer that must be sent to the device can increase. If the increase because of
the insertion of shift characters exceeds the original buffer field size, the following
occurs:
For an IBM device:
The field is truncated to fit into the screen field. Because shift characters
occupy display space, some user data might not appear on the screen. An error
message is logged once for each program unit that truncates data. The
translation routines make sure that no partial double-byte characters are included
in a truncated string and also that the last double-byte string is terminated by a
shift-out character.
For Fujitsu devices:
The expanded field is sent to the device if no double-byte characters start in the
last column of the screen. Because the load of the work buffer results in the
actual number of data characters being less than or equal to the screen field,
overflow does not occur. If a double-byte character starts in the last column of
the screen, a space is inserted in the last column and the character that would
have started at that position is started in the first column of the next line. The
addition of the extra space can cause data sent to the Fujitsu to be truncated by
one or two bytes.
For JET 6530 terminals and any PCT 6530 terminal emulator released by
Compaq Japan:
These devices do not correctly handle double-byte characters that start in
column 80. They behave in the same way that a Fujitsu 3270 does when a
screen field wraps from one line to the next.
As a programmer, you must be aware that an ACCEPT of a field truncated by a previous
DISPLAY operation can result in the accepted data being different from what you
intended.