Working with DBCS data

A DBCS file is a file that contains double-byte data or a file that is used to process double-byte data, for example, Japanese, Chinese, or Korean. Other files are called alphanumeric files. You can view DBCS files on display, printer, tape, diskette, and ICF devices.

A more modern method to support DBCS data is to use Unicode instead of DBCS fields. (IBM suggests that you use Unicode to develop new applications.)

You use data description specifications (DDS) to describe DBCS-capable device files.

You should indicate that a file is DBCS in one or more of the following situations:

  • The file receives input, or displays or prints output, which has double-byte characters.
  • The file contains double-byte literals.
  • The file has double-byte literals in the DDS that are used in the file at processing time (such as constant fields and error messages).
  • The DDS of the file includes DBCS keywords.
  • The file stores double-byte data (database files).

DBCS strings in a mixed data stream

Typically, both single-byte characters and double-byte characters are used in a DBCS environment. For example, an accounting firm in Japan uses both English and Japanese for the spreadsheet. If both English and Japanese are being encoded as mixed SBCS and DBCS, the product must be able to understand a mixed character set that contains both single-byte coded characters and double-byte coded characters.

In IBM® systems that use EBCDIC, a DBCS string is bracketed in a mixed data stream by a shift-out (SO) control character and a shift-in (SI) control character.

The following example shows the coding for a mixed string:

  sss  (SO)  D1D2D  (SI)  ssss

The following example shows the coding for a mixed hexadecimal string:

  818283  0E     41424143  0F  818283

Supported code ranges

The IBM i operating system supports Japanese, Korean, Simplified Chinese, and Traditional Chinese character-set code ranges.

Using the IBM i Access Family of products, the systems also provide support for these non-IBM personal computer DBCS code pages:

  • Republic of Korea National Standard graphic character set (KS)
  • Taiwan Industry Standard graphic character set (Big5)
  • The People's Republic of China National Standard graphic character set (GB)