Double-Byte Character Set (DBCS) support

A Double-Byte Character Set supports languages that have more characters than can be represented by 8 bits (such as Korean Hangeul and Japanese kanji). REXX has a full range of DBCS functions and handling techniques.

These DBCS functions and handling techniques include:
  • Symbol and string handling capabilities with DBCS characters.
  • An option that allows DBCS characters in symbols, comments, and literal strings.
  • An option that allows data strings to contain DBCS characters.
  • A number of functions that specifically support the processing of DBCS character strings
  • Defined DBCS enhancements to current instructions and functions.
Note: The use of DBCS does not affect the meaning of the built-in functions, as described in Functions. This explains how the characters in a result are obtained from the characters of the arguments by such actions as selecting, concatenating, and padding. This information describes how the resulting characters are represented as bytes. This internal representation is not usually seen if the results are printed. It might be seen if the results are displayed on certain terminals.

How to enable DBCS data operations and symbol use in REXX

The OPTIONS instruction controls how REXX regards DBCS data.

  • To enable DBCS operations, use the EXMODE option.
  • To enable DBCS symbols, use the ETMODE option on the OPTIONS instruction; this must be the first instruction in the program. See OPTIONS.

    If OPTIONS ETMODE is in effect, the language processor does validation to ensure that SO and SI are paired in comments. Otherwise, the contents of the comment are not checked. The comment delimiters (/* and */) must be SBCS characters.