MOVE -339.08 TO WS-INPUT-AMOUNT.
MOVE WS-INPUT-AMOUNT TO WS-OUTPUT-AMOUNT.
COMPUTE WS-OUT-AMOUNT-RUND ROUNDED = WS-INPUT-AMOUNT .
Unfortunately, the way you're doing this is quite wrong.
Both fields WS-OUTPUT-AMOUNT and WS-OUT-AMOUNT-RUND occupy the same 8 bytes of memory.
After the 1st MOVE, you have '0003390Q' in this area. If you look at it through the WS-OUTPUT-AMOUNT field, you will see -339.08.
If you look at it through the WS-OUT-AMOUNT-RUND field you will see -33908.
After the COMPUTE, you will have '0000033R' in memory. field WS-OUT-AMOUNT-RUND will have a value of -339 (as requested)
but looking at field WS-OUTPUT-AMOUNT will show you -3.39.
This requirement look strange to me:
I need to achive this with redefines clause as mentioned for round of variable.