Rounds a given value at a specified digit and pads spare digit positions with zeros.
ROUND(x,k)
x is a fixed-point arithmetic or fixed decimal picture value to be rounded, and k is an integer constant that specifies the digit at which the value x is to be rounded.
None
Descriptions
The first argument, x, is an expression. If the value to be rounded is negative, its absolute value is rounded, but its sign remains unchanged.
The second argument, k, may be an unsigned or signed digit. If k is positive, rounding occurs at the kth digit to the right of the decimal (or binary) point in the first argument; if k is zero, rounding occurs at the first digit to the left of the decimal (or binary) point in the first argument; if k is negative, rounding occurs at the (1 - k) digit to the left of the decimal (or binary) point in the first argument.
Examples
Rounding of FLOAT DECIMAL occurs at the nth decimal place, as opposed to the nth digit when ROUND of FIXED DECIMAL.
Example
Prints the following: