The MOVE command transfers data from one area
of storage to another. The keywords cannot be abbreviated.

>>-MOVE--+-reference-+--TO--reference--;-----------------------><
'-literal---'
- reference
- A valid z/OS® Debugger COBOL
reference.
- literal
- A valid COBOL literal.
Usage
notes
- For Enterprise COBOL for z/OS Version 5, you can use the MOVE command
to update the following special registers:
JNIENVPTR
SHIFT-IN
SHIFT-OUT
LINAGE-COUNTER of <FD>
- For Enterprise COBOL for z/OS Version 5, you can use the MOVE command
to update a numerical type with a non-numerical character. For example:
"Move "-999999909" to Znumed" where Znumed is defined as "01 Znumed pic -9,999.909".
- If z/OS Debugger was
started because of a computational condition or an attention interrupt,
using an assignment to set a variable might not give expected results.
This is due to the uncertainty of variable values within statements
as opposed to their values at statement boundaries.
- MOVE assigns a value only to a single receiver;
unlike COBOL, multiple receiver variables are not supported.
- The COBOL CORRESPONDING phrase is not supported.
- MOVE does not support date windowing. Therefore,
you cannot use the MOVE command to assign the value
of a windowed date field to an expanded date field or to a nondate
field.
- You cannot use the MOVE command to assign the
value of one expanded date field to another expanded date field with
a different DATE FORMAT clause, or to assign the value of one windowed
date field to another windowed date field with a different DATE FORMAT
clause.
Enterprise COBOL for z/OS Version
5 compiler does not support the DATE FORMAT clause. Additional information
on the DATE FORMAT clause and other clauses no longer
available can be found in Enterprise COBOL for z/OS Migration Guide Version 5 Release 1.
- If the DATA parameter of the PLAYBACK
ENABLE command is in effect for the current compile unit,
the MOVE command can be used while you replay recorded
statements by using the PLAYBACK commands. The target
of the MOVE command must be a session variable, not
a program variable.
- If you are debugging an optimized COBOL program, you can use the MOVE command
to assign a value to a program variable only if you first enter the SET
WARNING OFF command.
- If you are debugging a COBOL program that was compiled with the OPTIMIZE compiler
option, neither operand of the MOVE command can be
a variable that was discarded by the optimizer.
- If a COBOL variable defined as National is used as the receiving
field in a MOVE command with an alphabetic or alphanumeric
operand, the operand that is not National is converted to Unicode before that
move is done, except for Group items. See Enterprise COBOL for z/OS Language Reference for
more information about using COBOL variables with the MOVE statement.
- Literals with an N or NX prefix are always treated as National
data and can be moved only to other National Data Items or Group items.
Examples
Refer to the following topics
for more information related to the material discussed in this topic.