Ch 6_1. MOVING DATA


Move Syntax

1. MOVE identifier-1 TO identifier-2.
The PICture clause of both fields must be the same.
2. MOVE literal-1 TO identifier-2.

Moving Different Size

...                                      ...
03 AMT-IN  PIC  999.                     03 AMT-OUT  PIC  9(4) VALUE 4567.







...                                      ...
03 TAKEHOMEPAY  PIC  9999.               03 CHK-AMT  PIC  9(3).







Must ensure that the receiving field has at least as many integer positions as does the sending field.

Moving Decimal Portions of Numeric Field

...                                      ...
03 COST-IN  PIC 99V99.                   03 COST-OUT  PIC  999V999.








When the receiving field has fewer decimal positions than the sending field.
...                                      ...
03 COST-IN  PIC 99V99.                   03 COST-OUT  PIC  999V9.