Overlaying data in existing records

When data is to be copied or moved by the C (copy) or M (move) prefix commands and overlaid on one or more existing records, the O (overlay) prefix command specifies the destination for the data.

The data that is copied or moved overlays blanks in the destination records. This allows you to rearrange a single-column list of items into multiple column, or tabular, format.

When data is to be moved or copied and then overlaid on a destination:
  • Where the destination is a single record:
    • 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 record causes the data to be moved or copied and then overlaid on that record and also the next two records.

  • Where the destination is a block of records:
    • The OO (overlay, multiple-line target) prefix command specifies the first and last record of the destination for the data.

To overlay one or more single records:

  1. Type either M or C in the prefix area of the record that is to be moved or copied.
  2. Type O in the prefix area of the record that the moved or copied record is to overlay.
  3. Press Enter. The data being moved or copied overlays the specified record or records.

To overlay one or more blocks of records:

  1. Type either MM or CC in the prefix area of the first and last records of a block of records 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.
  2. Type OO in the prefix area of the first and last records that the block of records being moved or copied is to overlay. Again, you can scroll (or use FIND or LOCATE) between typing the first OO and the second OO, if necessary.
  3. Press Enter. The records that contain the two CC or MM commands and all of the records between them overlay the records that contain the two OO commands and all of the records between them.

Only blank characters in the records specified with O or OO are overlaid with characters in the corresponding columns from the source records. Characters that are not blank are not overlaid. The overlap affects only those characters within the current column boundaries.

The number of source and receiving records need not be the same. If there are more receiving records, the source records are repeated until the receiving records are gone. If there are more source records than receiving records, the extra source records are ignored. The overlay operation involves only data records. Special lines such as BNDS and COLS are ignored as either source or receiving lines.

Before the O (Overlay) prefix command illustrates the O (overlay) prefix command. Suppose you were editing a list in a single left-adjusted column and wanted to place portions of the list side-by-side. First, using the ) (column shift right) command, shift a portion of the list the appropriate amount to the right to overlay in a multiple column format. Next, type MM in the prefix area to mark the beginning and end of the block of records you want to move, then type OO in the prefix area to mark the destination of the records you want to overlay.

Figure 1. Before the O (Overlay) prefix command
  Process   Options   Help
 ───────────────────────────────────────────────────────────────────────────────
 Edit             JHELVON.TEST.DATA(OLAY)                          Top of 16
        Col 1       Insert Length 80              Record AT TOP     Format CHAR
        ----+----10---+----2----+----3----+----4----+----5----+----6----+----7--
 ****** ****  Top of data  ****
 000001 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
 000002
 mm0003 THESE RECORDS TO BE COPIED
 000004 THESE RECORDS TO BE COPIED
 000005 THESE RECORDS TO BE COPIED
 000006 THESE RECORDS TO BE COPIED
 mm0007 THESE RECORDS TO BE COPIED
 000008
 oo0009                               THESE RECORDS ARE THE TARGET
 000010                               THESE RECORDS ARE THE TARGET
 000011                               THESE RECORDS ARE THE TARGET
 000012                               THESE RECORDS ARE THE TARGET
 000013                               THESE RECORDS ARE THE TARGET
 oo0014                               THESE RECORDS ARE THE TARGET
 000015 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
 Command ===>                                                       Scroll CSR 
  F1=Help      F2=Zoom      F3=Exit      F4=CRetriev  F5=RFind     F6=RChange
  F7=Up        F8=Down      F9=Swap     F10=Left     F11=Right    F12=Cancel

When you press Enter, the editor overlays the records you marked to move on the destination block. See After the O (Overlay) prefix command.

Figure 2. After the O (Overlay) prefix command
  Process   Options   Help
 ───────────────────────────────────────────────────────────────────────────────
 Edit             JHELVON.TEST.DATA(OLAY)                          Top of 16
        Col 1       Insert Length 80              Record AT TOP     Format CHAR
        ----+----10---+----2----+----3----+----4----+----5----+----6----+----7--
 ****** ****  Top of data  ****
 000001 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
 000002
 000003
 000004 THESE RECORDS TO BE COPIED    THESE LINES ARE THE TARGET
 000005 THESE RECORDS TO BE COPIED    THESE LINES ARE THE TARGET
 000006 THESE RECORDS TO BE COPIED    THESE LINES ARE THE TARGET
 000007 THESE RECORDS TO BE COPIED    THESE LINES ARE THE TARGET
 000008 THESE RECORDS TO BE COPIED    THESE LINES ARE THE TARGET
 000009 THESE RECORDS TO BE COPIED    THESE LINES ARE THE TARGET
 000010 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
 000011
 ****** ****  End of data  ****



 Command ===>                                                       Scroll CSR 
  F1=Help      F2=Zoom      F3=Exit      F4=CRetriev  F5=RFind     F6=RChange
  F7=Up        F8=Down      F9=Swap     F10=Left     F11=Right    F12=Cancel

Related topics