The purpose of the format II MOVE statement is to allow data with different lengths to transfer between fields of a database record/element or an internal work area, with justifying and/or padding capability.
MOVE Statement (format II)
*DM MOVE {field-name | work-area | literal}
*DM OFFSET xxxxx LENGTH nnnnn
*DM TO {field-name | work-area} OFFSET xxxxx LENGTH nnnnn
*DM [JUSTIFY {RIGHT | LEFT}
*DM PAD {ZEROES | SPACES | literal}].
name Name of a database record field.
area Name of a DATAMACS-WORK-AREA field.
Any alphanumeric, numeric, hexadecimal data.
Points to a location within the field, relative to 0, where the move should begin.
Actual length of the data to be moved.
If the receiving field is longer than the sending field, specify where the data should be placed. If not specified, then LEFT will be assumed.
Specifies what type of data to use to fill the unmoved portion of the receiving field, when the receiving field is longer than the sending field.
Programming Notes:
The database records from different tables are held in memory in their own work area. When transferring a field from one database table record to another, it is not necessary to move it to a work area first.
| Copyright © 2009 CA. All rights reserved. | Tell Technical Publications how we can improve this information |