MBCHAR

An item of type MBCHAR is interpreted as a combination of single-byte and double-byte characters. The length reflects the number of single-byte characters that the item can contain and also reflects the number of bytes. The length ranges from 1 to 32767.

Workstation platforms like Windows 2000 use the ASCII character set; mainframe platforms like z/OS UNIX System Services use the EBCDIC character set. Differences in collating sequence generally cause greater-than and less-than comparisons to have different results in the two types of environments.

On a mainframe environment, include space for shift-out and shift-in characters if double-byte characters are possible in the item:

The shift-out and shift-in characters are deleted during an EBCDIC-to-ASCII data conversion and are inserted during an ASCII-to-EBCDIC data conversion. If a variable-length record is being converted, and if the current record end (as indicated by the record length) is within a structure item that is of type MBCHAR, the record length is adjusted to reflect the insertion or deletion of the shift-out and shift-in characters.

Double-byte character data is ideographic, as is necessary to display Chinese, Japanese, or Korean, for example. Display of such data requires a terminal device with double-byte character set capability.

Related reference
Primitive types