DECFLOAT_ROUNDMODE
The DECFLOAT_ROUNDMODE option tells UNLOAD PLUS how to round values in any DECFLOAT fields in your output.
If you do not specify a value, the utility uses the DECFLOAT round mode value from your DSNHDECP settings.
ROUND_CEILING
ROUND_CEILING rounds toward positive infinity. If the extra digits are all zero or the number is negative, the utility truncates the digits. Otherwise, the utility rounds the remaining value up (increments the rightmost digit by 1).
ROUND_DOWN
ROUND_DOWN truncates the extra digits (rounds toward 0).
ROUND_FLOOR
ROUND_FLOOR rounds toward negative infinity. If the extra digits are all zero or the number is positive, the utility truncates the digits. Otherwise, the remaining value is negative and the utility rounds up (increments the rightmost digit by 1).
ROUND_HALF_DOWN
ROUND_HALF_DOWN rounds to the nearest number as explained in the following table:
Extra digits | Utility action |
---|---|
.5 or less | Truncates the digits (rounds the remaining value down) |
Greater than .5 | Rounds the remaining value up (increments the rightmost digit by 1) |
ROUND_HALF_EVEN
ROUND_HALF_EVEN rounds to the nearest number as explained in the following table:
Extra digits | Rightmost digit of remaining value | Utility action |
---|---|---|
Greater than .5 | Not applicable | Rounds the remaining value up (increments the rightmost digit by 1) |
Less than .5 | Not applicable | Truncates the digits (rounds the remaining value down) |
Equal to .5 | Odd | Rounds the remaining value up (increments the rightmost digit by 1) |
Equal to .5 | Even | Truncates the digits (rounds the remaining value down) |
ROUND_HALF_UP
ROUND_HALF_UP rounds to the nearest number as explained in the following table:
Extra digits | Utility action |
---|---|
Less than .5 | Truncates the digits (rounds the remaining value down) |
.5 or greater | Rounds the remaining value up (increments the rightmost digit by 1) |
ROUND_UP
ROUND_UP rounds away from 0. If the extra digits are all zero, the utility truncates the digits. Otherwise, the utility rounds the remaining value up (increments the rightmost digit by 1).
Related topic