Additional input field length information
The table in this topic describes additional information about input field lengths for some data types.
Field data type | Field length (in bytes) |
---|---|
INTEGER EXTERNAL(n) | n |
DECIMAL(n) | Integer(n/2) + 1 |
DECIMAL EXTERNAL(n) | n |
DECIMAL ZONED(n) | n |
FLOAT(n) | 4 if 1 <=n<= 21 8 if 22<=n<= 53 |
FLOAT EXTERNAL(n) | n |
VARBINARY | The two-byte length + 2 |
VARCHAR | The two-byte length + 2 |
GRAPHIC(n) | 2n |
GRAPHIC EXTERNAL(n) | 2n + 2 for the shift characters |
VARGRAPHIC | The two-byte length * 2 + 2 |
DATE EXTERNAL(n) | n |
DATE-format EXTERNAL(n) | n if CHARACTER Always 4 if INTEGER Integer(n/2) + 1 if DECIMAL |
TIME EXTERNAL(n) | n |
TIME-format EXTERNAL(n) | n if CHARACTER Always 4 if INTEGER Integer(n/2) + 1 if DECIMAL |
TIMESTAMP EXTERNAL(n) | n |
TIMESTAMP-format EXTERNAL(n) | n if CHARACTER Always 4 if INTEGER Integer(n/2) + 1 if DECIMAL |
ROWID | The two-byte length + 2 |
BLOB | The four-byte length + 4 |
CLOB | The four-byte length + 4 |
DBCLOB | The four-byte length + 4 |
XML | The two-byte length + 2 |
EXIT(n) | n |
Related topic