Purpose
Returns the specified numeric value with the opposite sign:
Syntax
►►─┬─ INVERT-SIGN ─┬─ ( value ) ──────────────────────────────────────────────►◄ └─ INVert ──────┘
Parameters
Specifies the numeric value whose sign inversion value is calculated.
Value can be:
Example
In the following example, the sign inversion function is used to form the negative of a value if the transaction code is 'DB':
Initial values:
TRANS-CODE: 'DB'
WK-AMT: 453.29
Statements:
IF TRANS-CODE EQ 'DB'
THEN
MOVE INVERT-SIGN(WK-AMT) TO WK-AMT.
Returned value: -453.29
|
Copyright © 2014 CA.
All rights reserved.
|
|