Overlaying data in existing rows
You can overlay data in a row with data from another row by specifying the O or OO prefix commands.
When data is to be copied or moved by the C (copy) or M (move) prefix commands and overlaid on one or more existing rows, the O or OO (overlay) prefix commands specify the destination for the data. You can only overlay data onto character columns (CHAR and VARCHAR).
The data that is copied or moved overlays blanks in the destination rows.
- It must have a non-zero length.
- If the length of the data being moved or copied is longer than the destination column, only the data that can fit into the destination column is moved or copied.
- Where the destination is a single row:
- The O (overlay) prefix command specifies the destination for the
data.
You can type a number after the O prefix command to specify the number of times that the M or C prefix command is to be performed. For example, typing the command
O3
against a row causes the data to be moved or copied and then overlaid on that row and also the next two rows.
- The O (overlay) prefix command specifies the destination for the
data.
- Where the destination is a block of rows:
- The OO (overlay, multiple-line target) prefix command specifies the first and last row of the destination for the data.
To overlay one or more single rows:
- Type either
M
orC
in the prefix area of the row that is to be moved or copied. - Type
O
in the prefix area of the row that the moved or copied record is to overlay. - Press Enter. The data being moved or copied overlays the specified row or rows.
To overlay one or more blocks of rows:
- Type either
MM
orCC
in the prefix area of the first and last rows of a block of rows that is to be moved or copied. You can scroll (or use FIND or LOCATE) between typing the first command and the second command, if necessary. - Type
OO
in the prefix area of the first and last rows that the block of rows being moved or copied is to overlay. Again, you can scroll (or use FIND or LOCATE) between typing the firstOO
and the secondOO
, if necessary. - Press Enter. The rows that contain the two CC or MM commands and all of the rows between them overlay the rows that contain the two OO commands and all of the rows between them.
The number of source and receiving rows need not be the same. If there are more receiving rows, the source rows are repeated until the receiving rows are gone. If there are more source rows than receiving rows, the extra source rows are ignored.
Related topics
Related references