COBOL Manual for TNS and TNS/R Programs
Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs—522555-006
9-128
MOVE
MOVE
MOVE TO
MOVE TO copies data from a data item and stores it in one or more other data items.
sender
is the literal or the identifier of the data item from which data is copied.
receiver
is the identifier of a data item to which the data is to be copied.
Usage Considerations:
•
Evaluation of Subscripts and Indexes
Subscripts or indexes in sender are evaluated only once, immediately before
data is moved to the first receiver. Subscripts or indexes in receivers are
evaluated in the order in which the receivers are specified. For example,
MOVE A(B) TO B C(B)
is equivalent to
MOVE A(B) TO temp
MOVE temp TO B
MOVE temp TO C(B)
•
MOVE Statements That Are Not Recommended
Do not attempt these moves:
°
SPACE, alphanumeric edited, or alphabetic data item to numeric or numeric
edited data item
°
ZERO, numeric literal, numeric, or numeric edited data item to alphabetic data
item
Form Description
MOVE TO
Copies data from a data item and stores it in one or more
other data items
MOVE CORRESPONDING
Copies elements of one group to corresponding elements of
another group
senderMOVE receiverTO
VST182.vsd