Appendix D. Supporting International Languages with Double-Byte Character Sets

This appendix describes only those enhancements made to the COBOL programming language for writing programs that process double-byte characters.

Specifically, this appendix describes where you can use Double-Byte Character Set (DBCS) characters in each portion of a COBOL program, and considerations for working with DBCS data in the ILE COBOL language.

There are two ways to specify DBCS characters:
  • Bracketed-DBCS
  • DBCS-graphic data.

In general, COBOL handles bracketed-DBCS characters in the same way it handles alphanumeric characters. Bracketed-DBCS is a character string in which each character is represented by two bytes. The character string starts with a shift-out (SO) character, and ends with a shift-in (SI) character. It is up to you to know (or have the COBOL program check) which data items contain DBCS characters, and to make sure the program receives and processes this information correctly.

You can use DDS descriptions that define DBCS-graphic data fields with your ILE COBOL programs. DBCS-graphic pertains to a character string where each character is represented by two bytes. The character string does not contain shift-out or shift-in characters. For information on handling graphic data items specified in externally-described files in your ILE COBOL programs, refer to DBCS-Graphic Fields.