9 207 ROUND

LANSA Technical

9.207 ROUND

Þ Note: Built-In Function Rules.

Rounds off a decimal value.

For use with

LANSA for i

YES

Visual LANSA for Windows

YES

Visual LANSA for Linux

YES

 

 

Arguments

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

N

Req

Value to be rounded

1

15

0

9

 

 

Return Values

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.

Example

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)