z/OS ISPF Edit and Edit Macros
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


O, OK—Overlay Lines

z/OS ISPF Edit and Edit Macros
SC19-3621-00

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

If there are multiple destinations for the data, the OK (overlay, intermediate target) line command specifies each intermediate destination for the data. You specify the final destination for the data with either the O (overlay), A (after), or B (before) line commands. The final destination must be after the intermediate destinations in the file. For more information about the A and B line commands, see:

The data that is copied or moved overlays blanks in the destination lines of data. 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 single destination:
  • Where the destination is a single line:
    • The O (overlay) line command specifies the destination for the data.

      You can type a number after the O line command to specify the number of times that the M or C line command is to be performed. For example, typing the command O3 against a line causes the data to be moved or copied and then overlaid on that line and also the next two lines.

  • Where the destination is a block of lines:
    • The OO (overlay, multiple-line target) line command specifies the first and last line of the destination for the data.
When data is to be moved or copied and then overlaid on multiple destinations:
  • Where each destination is a single line:
    • The OK (overlay, intermediate target) line command specifies each intermediate destination (but not the final destination) for the data.

      You can type a number after the OK line command to specify the number of times that the M or C line command is to be performed. For example, typing the command OK3 against a line causes the data to be moved or copied and then overlaid on that line and also the next two lines.

    • The O (overlay) line command specifies the final destination for the data.

      You can type a number after the O line command as previously described.

  • Where each destination is a block of lines:
    • The OOK (overlay, intermediate multiple-line target) line command specifies the first and last line of each intermediate destination (but not the final destination) for the data.
    • The OO (overlay, multiple-line target) line command specifies the first and last line of the final destination for the data.
Note: The OK and OOK line commands indicate that another destination of the form A, B, or O is still required proceeding forward through the file before the data is moved or copied to the multiple destinations specified.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-+-O--+--+---+-----------------------------------------------><
   '-OK-'  '-n-'   

Read syntax diagramSkip visual syntax diagram
>>-+-OO--+-----------------------------------------------------><
   '-OOK-'   

n
The number of lines to be overlaid. If you do not type a number, or if the number you type is 1, only one line is overlaid.

Description

To overlay one or more single lines:

  1. Type either M or C in the line command field of the line that is to be moved or copied.
  2. To specify a single destination for the data that is to be moved or copied, type O in the line command field of the line that the moved or copied line is to overlay.

    To specify multiple destinations for the data that is to be moved or copied:

    1. Type OK in the line command field of each intermediate destination line (but not the final destination line) that the moved or copied data is to overlay.

      To overlay data in the lines following an intermediate destination line, type a number after the OK line command to specify the number of times that the M or C line command is to be performed.

    2. Type O in the line command field of the final destination line that the moved or copied data is to overlay. The final destination line must come after all the intermediate destination lines.

      To overlay data in the lines following the final destination line, type a number after the O line command to specify the number of times that the M or C line command is to be performed.

  3. Press Enter. The data being moved or copied overlays the specified line or lines.

To overlay one or more blocks of lines:

  1. Type either MM or CC in the line command field of the first and last lines of a block of lines 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. To specify a single destination for the data that is to be moved or copied, type OO in the line command field of the first and last lines that the block of lines 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.

    To specify multiple destinations for the data that is to be moved or copied:

    1. Type OOK in the line command field of the first and last lines of each intermediate destination (but not the final destination) that the block of lines being moved or copied is to overlay.
    2. Type OO in the line command field of the first and last lines of the final destination that the moved or copied data is to overlay. The lines of the final destination must come after all those of the intermediate lines.
  3. Press Enter. The lines that contain the two CC or MM commands and all of the lines between them overlay the lines that contain:
    • Each pair of OOK commands and all of the lines between them.
    • The two OO commands and all of the lines between them.

Only blank characters in the lines specified with O or OO (or OK or OOK) are overlaid with characters in the corresponding columns from the source lines. 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 lines need not be the same. If there are more receiving lines, the source lines are repeated until the receiving lines are gone. If there are more source lines than receiving lines, the extra source lines are ignored. The overlay operation involves only data lines. Special lines such as MASK, TABS, BNDS, and COLS are ignored as either source or receiving lines.

Note: There is no special support for DBCS data handling. You are responsible for DBCS data integrity when overlaying lines.

Examples

Figure 1 illustrates the O (overlay) line 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 line command field to mark the beginning and end of the block of lines you want to move, then type OO in the line command field to mark the destination of the lines you want to overlay.

Figure 1. Before the O (Overlay) line command
Screen dump.

When you press Enter, the editor overlays the lines you marked to move on the destination block. See Figure 2.

Figure 2. After the O (Overlay) line command
Screen dump.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014