An item of type DECIMAL is a numeric value in which each half-byte is a hexadecimal character, and the sign is represented by a hexadecimal C (for a positive number) or a hexadecimal D (for a negative number) in the right half of the rightmost byte.
The length reflects the number of digits and ranges from 1 to 32.
To determine the number of bytes, add 2 to the length value, divide the sum by 2, and truncate any fraction in the result.
// for decimal 123 00 12 3C // for decimal -123 00 12 3D // for decimal 1234 01 23 4C // for decimal -1234 01 23 4D
A negative value that is read from a file or database into a field of type DECIMAL may have a hexadecimal B in place of a D; EGL accepts the value but converts the B to D.
The format of a DB2® UDB column of type DECIMAL is equivalent to the format of a DECIMAL-type host variable.
Related reference
Primitive types