The LIMITS option specifies various implementation limits.
.-+---+-------------------------------------. | '-,-' | V .-7-. | >>-LIMITS--(----+-EXTNAME--(--+-n--+--)-----------------+-+--)->< | .-31-. | +-FIXEDBIN--(--+-63-+--+-----------+--)-+ | | .-31-. | | | '-,--+-63-+-' | | .-15-. | +-FIXEDDEC--(--+-31-+--+-----------+--)-+ | | .-15-. | | | '-,--+-31-+-' | | .-100-. | '-NAME--(--+-n---+--)-------------------'
If FIXEDDEC(15,31) is specified, then you may declare FIXED DECIMAL variables with precision greater than 15, but unless an expression contains an operand with precision greater than 15, all arithmetic will done using 15 as the maximum precision.
FIXEDDEC(15,31) will provide much better performance than FIXEDDEC(31).
FIXEDDEC(15) and FIXEDDEC(15,15) are equivalent; similarly, FIXEDDEC(31) and FIXEDDEC(31,31) are equivalent.
FIXEDDEC(31,15) is not allowed.
If FIXEDBIN(31,63) is specified, then you may declare 8-byte integers, but unless an expression contains an 8-byte integer, all integer arithmetic will done using 4-byte integers.
Note however, that specifying the FIXEDBIN(31,63) or FIXEDBIN(63) option may cause the compiler to use 8-byte integer arithmetic for expressions mixing data types. For example, if a FIXED BIN(31) value is added to a FIXED DEC(13) value, then the compiler will produce a FIXED BIN result and under LIMITS(FIXEDBIN(31,63)) that result would have a precision greater than 31 (because the FIXED DEC precision is greater than 9). When this occurs, the compiler will issue informational message IBM2809.
FIXEDBIN(31,63) will provide much better performance than FIXEDBIN(63).
FIXEDBIN(31) and FIXEDBIN(31,31) are equivalent; similarly, FIXEDBIN(63) and FIXEDBIN(63,63) are equivalent.
FIXEDBIN(63,31) is not allowed.
The maximum precision for UNSIGNED FIXED BINARY is one greater, that is, 32 and 64.