Data Movement



At the most simplistic level this is achieved by the MOVE Statement in COBOL, and the Assignment Statement in PLI. This belies the fact that data conversion may be required if both fields are not of the same type.

The data conversion element means that there may not be a one-to-one relationship between the source statement and the executable instructions.

This makes direct comparison difficult, so the table opposite lists some of the move instructions available in Assembler.

Some memory to memory MOVE instriuctions.



Instruction

Description

MVC

Copy up to 256 bytes from one memory location to another.

MVCL

Copy more than 256 bytes from one memory location to another.

MVI

Insert a single byte into a memory location.

MVST

Copy a delineated string from one memory location to another.

PACK

Typically used to Convert a Zoned Decimal number at one memory location into a Packed Decimal number at another.

UNPK

Used to unpack data at one memory location into another. The data does not have to be numeric.

 

 

CVB

Convert a Packed Decimal number at a memory location and place the result in a Register.

CVD

Convert a Binary number in a Register to a Packed Decimal number and put the result at a memory location.


There are many other instructions for moving data from memory to a Register (LOAD operations) and for moving data from a Register to Memory (STORE operations).

Copyright © Legac-e Education 2015-