It is used to move data from one place in the memory to another place.
General Form:
MOVE identifier-1 TO identifier-2 [, identifier-3] …
literal -1
Data movement is governed by the following rules.
a) The contents of identifier-1 or the value of literal-1 is moved to identifier-2. Identifier-3, etc. Note that there may be more than one receiving field whereas there must be only one sending field; the contents of all receiving fields will be replaced by the value of the sending field. The contents of identifier-1 remain unaltered.
b) When the sending field is numeric and the receiving field is numeric or numeric edited (i.e. picture contains edit symbols) the data movement is called numeric data transfer.
c) When both the sending and receiving fields are alphabetic, alphanumeric or alphanumeric edited, the data movement is called alphanumeric data transfer.
Example:
(a) MOVE 15 TO A.
Number 15 will be moved to A.
(a) MOVE “THERE IS AN ERROR” TO A.
From quotes to quotes the total number of characters including space is 17. Since this is a non-numeric literal, all the 17 characters will be moved to A from left to right if the PICTURE of A is X(17).
(C) MOVE A TO B, C, D.
No comments:
Post a Comment