| Note: Built-In Function Rules Usage Options |
Rounds off a decimal value.
No | Type | Req/ Opt | Description | Min Len | Max Len | Min Dec | Max Dec |
|---|---|---|---|---|---|---|---|
1 | N | Req | Value to be rounded | 1 | 15 | 0 | 9 |
No | Type | Req/ Opt | Description | Min Len | Max Len | Min Dec | Max Dec |
|---|---|---|---|---|---|---|---|
1 | N | Req | Returned value | 1 | 15 | 0 | 9 |
| Note: This function will round off a numeric value. The length of the return value field will determine where the value will be rounded. |
To round a 3 decimal field to 2 decimal places.
DEFINE FIELD(#INVAL) TYPE(*DEC) LENGTH(5) DECIMALS(3)
DEFINE FIELD(#OUTVAL) TYPE(*DEC) LENGTH(4) DECIMALS(2)
USE BUILTIN(ROUND) WITH_ARGS(#INVAL) TO_GET(#OUTVAL)