To code a DBCS string
The computer hardware automatically inserts a shiftout character ([SO]).
The computer hardware automatically inserts a shiftin character ([SI]).
Depending on your terminal hardware, the shift code occupies from one to three bytes. The shift codes are invisible. However, on an IBM-5550 machine, a shift code occupies a screen position; on Fujitsu hardware, it does not.
This first example uses a double-byte character string in the COMMENTS clause of the DESTINATION statement.
add destination name is dest01
comments is '[so]dbcs-character string[si]' .
This second example uses a double-byte character string in the VALUE clause of a COBOL Record Element. Note that the [si] and [so] sequences, which are located at the very beginning and end of the quoted string, must be coded as 1 byte hexadecimal characters for the z/OS, z/VM and z/VSE platforms. The hex representation is provided for clarity.
__________________________________________________________
02 FIELD-5 PIC G(5) DISPLAY-1
44444444444FF4CCCDC6F4444444444444DCC4C4F54CCEDDCE6F444444
000000000000206953405000000000000079307D5D0492731801000000
__________________________________________________________
VALUE G' DBCS-STR ' .
44444444444444444444444444444444444ECDEC4C70CCCE6EED074444
000000000000000000000000000000000005134507DE42320239FD0B00
__________________________________________________________
|
Copyright © 2014 CA.
All rights reserved.
|
|