Decimal properties

You can set the following decimal properties:

Maximum precision
Indicates the maximum precision of decimal data that will be returned. Possible values are 31 OR 63

Maximum scale
Indicates the maximum scale used in artithmetic calculations involving decimal data. This value must be smaller than the value of the maximum decimal precision. Possible values are 0, 31, or 63.

Minimum divide scale
Indicates the minimum scale used in arithmetic caluculations involving decimal data. Possible values are 0-9.

Decimal floating point rounding mode
Indicates the decimal float point rounding mode. Possible values are:

Ceiling
Round toward +infinity. If all of the discarded digits are zero or if the sign is negative the result is unchanged other than the removal of the discarded digits. Otherwise, the result coefficient is incremented by one (rounded up).

Down
Round toward zero (truncation). The discarded digits are ignored.

Floor
Round toward -infinity. If all of the discarded digits are zero or if the sign is positive, the result is unchanged other than the removal of the discarded digits. Otherwise, the sign is negative and the result coefficient is incremented by one.

Half down
Round to nearest; if equidistant, round down. If the discarded digits represent greater than half (0.5) of the value of a one in the next left position, then the result coefficient is incremented by one (rounded up). Otherwise, the discarded digits are ignored.

Half even
Round to nearest; if equidistant, round so that the final digit is even. If the discarded digits represent greater than half (0.5) of the value of a one in the next left position, then the result coefficient is incremented by one (rounded up). If they represent less than half, then the result coefficient is not adjusted (that is, the discarded digits are ignored). Otherwise (they represent exactly half), the result coefficient is unaltered if its rightmost digit is even or incremented by one (rounded up) if its rightmost digit is odd (to make an even digit).

Half up
Round to nearest; if equidistant, round up. If the discarded digits represent greater than or equal to half (0.5) of the value of a one in the next left position, then the result coefficient is incremented by one (rounded up). Otherwise, the discarded digits are ignored.

Up
Round away from zero. If all of the discarded digits are zero, the result is unchanged other than the removal of discarded digits. Otherwise, the result coefficient is incremented by one (rounded up).