Additional numeric EXTERNAL or CHARACTER field considerations
This topic describes additional considerations that apply to numeric EXTERNAL fields and CHARACTER fields.
A numeric EXTERNAL or CHARACTER field for a numeric column produces an EBCDIC character representation of the numeric value. The major difference between the two is that numeric EXTERNAL is a numeric type, and CHARACTER is a character type. This difference is important when using IF condition VALUE(), because the data type of the value must match the data type of the field. For example, INTEGER EXTERNAL(9) requires that you use a numeric value like VALUE(0), while CHARACTER(9) would require you to use a character value such as VALUE(' 0') to get the same results.
The following table illustrates what you can expect when you use numeric EXTERNAL:
Results from numeric EXTERNAL
Data type | Result |
---|---|
SMALLINT EXTERNAL INTEGER EXTERNAL BIGINT EXTERNAL |
UNLOAD PLUS uses blanks to pad the value if the field is longer than 11 (SMALLINT and INTEGER) or 20 (BIGINT). |
DECIMAL EXTERNAL |
UNLOAD PLUS uses blanks to pad the value if the field is longer than 33. |
FLOAT EXTERNAL | Character representation of the floating-point value in the format of +-.dddddddddE+-ee The maximum field width is 15 for single precision and 24 for double precision. |
DECFLOAT EXTERNAL | Character representation of the decimal floating-point value The maximum field width is 23 for a precision of 16 and 42 for a precision of 34. |
Related topic