From | To | Results in |
INTEGER | STRING | ASCII or EBCDIC representation of the value |
DECIMAL | STRING | ASCII or EBCDIC representation of the value, including decimal and sign |
REAL | STRING | ASCII or EBCDIC representation of the value, including decimal and sign--may be expressed in scientific notation |
UNICODE | STRING | ASCII or EBCDIC representation with any non-existent characters appearing as the SUBstitute control code (0x1A in ASCII or 0x3F in EBCDIC) and any non-valid ASCII or EBCDIC characters appearing as the substitution codepoint (0xFFFD) |
UTF8 | STRING | ASCII or EBCDIC representation with any non-existent characters appearing as the SUBstitute control code (0x1A in ASCII or 0x3F in EBCDIC) and any non-valid ASCII or EBCDIC characters appearing as the substitution codepoint (0xFFFD) |
STRING | QSTRING | Uppercase ASCII representation |
INTEGER | UNICODE | UNICODE representation of the value |
DECIMAL | UNICODE | UNICODE representation of the value, including decimal and sign |
REAL | UNICODE | UNICODE representation of the value, including decimal and sign--may be expressed in scientific notation |
INTEGER | UTF8 | UTF8 representation of the value |
DECIMAL | UTF8 | UTF8 representation of the value, including decimal and sign |
REAL | UTF8 | UTF8 representation of the value, including decimal and sign--may be expressed in scientific notation |
INTEGER | REAL | Value is cast with loss of precision when the value is greater than 15 significant digits |
INTEGER | REAL4 | Value is cast with loss of precision when the value is greater than 7 significant digits |
STRING | REAL | Sign, integer, and decimal portion of the string value |
DECIMAL | REAL | Value is cast with loss of precision when the value is greater than 15 significant digits |
DECIMAL | REAL4 | Value is cast with loss of precision when the value is greater than 7 significant digits |
INTEGER | DECIMAL | Loss of precision if the DECIMAL is too small |
REAL | DECIMAL | Loss of precision if the DECIMAL is too small |
STRING | DECIMAL | Sign, integer, and decimal portion of the string value |
STRING | INTEGER | Sign and integer portions of the string value |
REAL | INTEGER | Integer value, only--decimal portion is truncated |
DECIMAL | INTEGER | Integer value, only--decimal portion is truncated |
INTEGER | BOOLEAN | 0 = FALSE, anything else = TRUE |
BOOLEAN | INTEGER | FALSE = 0, TRUE = 1 |
STRING | BOOLEAN | '' = FALSE, anything else = TRUE |
BOOLEAN | STRING | FALSE = '', TRUE = '1' |
DATA | STRING | Value is cast with no translation |
STRING | DATA | Value is cast with no translation |
DATA | UNICODE | Value is cast with no translation |
UNICODE | DATA | Value is cast with no translation |
DATA | UTF8 | Value is cast with no translation |
UTF8 | DATA | Value is cast with no translation |
UTF8 | UNICODE | Value is cast with no translation |
UNICODE | UTF8 | Value is cast with no translation |
The casting rules for STRING to and from any numeric type apply equally to all string types, also. All casting rules apply equally to sets (using the SET OF type syntax).