by shankarhosur » Thu Oct 28, 2010 1:21 am
Hello,
Result will store in B
ADD A TO B means B=A+B; (its like add 1 to B we usually use...)
so results will store in B.
JFYI,
MOVE 1 TO WS-VAR1
MOVE 2 TO WS-VAR2
DISPLAY 'BEFORE ADD WS-VAR1:' WS-VAR1
DISPLAY 'BEFORE ADD WS-VAR2:' WS-VAR2
ADD WS-VAR1 TO WS-VAR2
DISPLAY 'AFTER ADD WS-VAR1:' WS-VAR1
DISPLAY 'AFTER ADD WS-VAR2:' WS-VAR2
Output of the code is:
BEFORE ADD WS-VAR1:0001
BEFORE ADD WS-VAR2:0002
AFTER ADD WS-VAR1:0001
AFTER ADD WS-VAR2:0003