An item of type CHAR is interpreted as a series of single-byte characters. The length reflects both the number of characters and the number of bytes and ranges from 1 to 32767.
Workstation platforms like Windows(R) 2000 use the ASCII character set; mainframe platforms like z/OS(R) UNIX(R) 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.
Related reference
Primitive types
An item of type DBCHAR is interpreted as a series of double-byte characters. The length reflects the number of characters and ranges from 1 to 16383. To determine the number of bytes, double the length value.
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.
DBCS data is ideographic, as is necessary to display Chinese, Japanese, or Korean, for example. Display of such data requires a terminal device with DBCS capability.
Related reference
Primitive types
An item of type HEX is interpreted as a series of hexadecimal digits (0-9, a-f, and A-F), which are treated as characters. The length reflects the number of digits and ranges from 1 to 65534. To determine the number of bytes, divide by 2.
For an item of length 4, the internal bit representations of example values are as follows:
// hexadecimal value 04 D2 00000100 11010010 // hexadecimal value FB 2E 11111011 00101110
The primary use of an item of type HEX is to access a file or database field whose data type does not match another EGL primitive type.
You can assign a hexadecimal value by using a literal that is of type CHAR and that includes only characters in the range of hexadecimal digits, as in these examples:
myHex01 = "ab02"; myHex02 = "123E";
You can include a hexadecimal item as an operand in a logical expression, as in these examples:
if (myHex01 = "aBCd") myFunction01(); else if (myHex > myHex02) myFunction02(); end end
You cannot include a hexadecimal item in an arithmetic expression.
Related reference
Primitive types
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, you must 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
The primitive type UNICODE gives you a way to process and store text that may be in any of several human languages; however, the text must have been provided from outside your code. Literals of type UNICODE are not supported.
The following statements are true of an item of type UNICODE:
For details on Unicode, see the web site of the Unicode Consortium (www.unicode.org).
Related reference
Primitive types
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.