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

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
MOVE Conventions
Table 61 summarizes the legal MOVE TO statements by category of sending and receiving
data items. Data is converted and stored according to the category of the receiving data item.
Table 61 Summary of Legal Moves
Category of Receiving Data Item
NationalNumericAlphanumericAlphabeticCategory of Sending Data Item
NoNoYesYesAlphabetic
NoNoYes*YesEditedAlphanumeric
NoYesYesYesNon-Edited
NoYesYesNoIntegerNumeric
NoYesYesNoNoninteger
NoYesYesNoEdited
YesNoNoNoNational
* Although it is possible to move an alphanumeric item to a numeric item, the presence of a nonnumeric character
in the data moved makes any operation on the numeric item unpredictable.
Alphabetic, Alphanumeric, Alphanumeric Edited, or National Receiving Data Items
Data is stored beginning at the leftmost position of receiver.If sender is shorter than
receiver, spaces are filled according to standard alignment rules. If sender is longer than
receiver, the value of sender is truncated on the right to the length of receiver. Any
editing required by receiver is performed unless sender is a group data item.
If sender is a signed numeric data item, the operational sign is not moved to receiver. If
sender is described with the SEPARATE phrase in the SIGN clause, the size of sender is
considered to be one character less than the actual size of sender.
If sender is a numeric item with the scaling factor (P ) in its rightmost digits, positions
containing P are considered to contain zeros.
If sender is a numeric item with decimal digits (that is, sender has V in its PICTURE clause),
the decimal point is ignored and sender is treated as if it were an alphanumeric item whose
MOVE 369