COBOL Manual for TNS/E Programs (H06.08+, J06.03+)

MOVE SPACES TO RECORD-IN
* RECORD-IN is set to " "
* (9 spaces)
MOVE ZEROS TO ITEM-B
* ITEM-B is set to 00v00
* where "v" marks the decimal location
MOVE 5280 TO ITEM-C.
* ITEM-C is set to " 5,280.00"
MOVE ITEM-C TO TEMP-3.
* TEMP-3 is set to 05280v000
* where "v" marks the decimal location
MOVE ZEROS TO TEMP-5.
* Each 2-digit T in TEMP-5 is set to
* the 2-character value "00". Do not
* move ZEROS to any group containing
* COMP or NATIVE-n items, because the
* operation delivers characters.
* Do not move LOW-VALUES to a group
* of numeric items -- instead use
* INITIALIZE ...
* REPLACING NUMERIC DATA BY ZERO
MOVE CORRESPONDING
MOVE CORRESPONDING copies elements of one group to corresponding elements of another
group. Groups of data correspond if they have the same names and qualifier names, beyond the
group-names in the MOVE statement, and if they meet restraints explained under CORRESPONDING
Phrase (page 243).
CAUTION: MOVE CORRESPONDING is not recommended, because minor changes to one
group can change the correspondence between its elements and those of the other group, and
this is difficult to detect. If someone adds a new name to a group, the new name might be included
in unintended move operations.
group-1
is the group-name of the data to be copied.
group-2
is the group-name to which the data is to be copied.
MULTIPLY
MULTIPLY BY
MULTIPLY BY multiplies one data item by one or more other data items and stores the result(s) in
the other data item(s); for example, the statement
MULTIPLY A BY B C D
means store A x B in B, A x C in C, and A x D in D.
MULTIPLY 371