Pathway/iTS TCP and Terminal Programming Guide

Processing Double-Byte Character Sets
Compaq NonStop™ Pathway/iTS TCP and Terminal Programming Guide426751-001
8-16
Example of Working-Storage Section and Screen
Section
the Screen Section would be as follows:
SCREEN SECTION.
* Data translation occurs, if necessary, for each field
* declared in these screen examples. Data translation
* consists of converting double-byte characters in
* external form to internal form (Shift JIS) on
* input or from internal form to device-specific
* external form on output. Such translation is normally
* required only for the 3270-class devices produced by IBM
* and Fujitsu. Data entered from the Japanese version of
* PCT, running on IBM or Fujitsu personal computers, does
* not require input or output translation because the
* emulators transmit double-byte characters in Shift-JIS
* format.
.
:
05 SS-ALPHA-NUMERIC PIC X(20) at ....
USING WS-KANJI-TO-PICX-REDEF.
* No editing. This is effectively a PIC X to PIC X move.
* The programmer is responsible for data integrity.
05 SS-ALPHA-NUMERIC-EDITED1 PIC AANXBAAN0NXNXNX at ....
* This PIC field uses 20 bytes.
USING WS-ALPHA-NUMERIC-FLD.
* Outbound editing performed by the TCP consists of simple
* insertion only, for example, the B here. Inbound
* editing performed by the TCP is done according to the
* screen-item characters in the PIC clause. For example,
* the TCP expects an alphabetic character, followed by a
* numeric, followed by a double-byte character set
* character,and so on.
05 SS-ALPHA-NUMERIC-EDITED2 PIC AXNXBAXN0NXNXNX at ....
USING WS-KANJI-ONLY-FLD2.
* Outbound editing performed by the TCP consists of simple
* insertion only, for example, the B here. Inbound
* editing is performed by the TCP according to the screen-
* item PICTURE clause. The Working-Storage field cannot
* contain data that has only double-byte characters. The
* programmer is responsible for data integrity.