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


M—Move Lines

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

The M (move) line command moves lines from one location to another.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-M--+---+----------------------------------------------------><
      '-n-'   

Read syntax diagramSkip visual syntax diagram
>>-MM----------------------------------------------------------><

n
The number of lines to be moved. If you do not type a number, or if the number you type is 1, only the line on which you type M is moved.

Description

To move one or more lines within the same data set or member:

  1. Type M in the line command field of the line to be moved. If you want to move one or more lines that immediately follow this line, type a number greater than 1 after the M command.
  2. Next, specify the destination of the line to be moved by using either the A (after), B (before), or O (overlay) line command. See the descriptions of those commands if you need more information about them.
  3. Press Enter. The line or lines are moved to the new location.

To move a block of lines within the same data set or member:

  1. Type MM in the line command field of both the first and last lines to be moved. You can scroll (or use FIND or LOCATE) between typing the first MM and the second MM, if necessary.
  2. Use the A (after), B (before), or OO (overlay) command to show where the moved lines are to be placed. Notice that when you use the block form of the M command (MM) to move and overlay lines, you should also use the block form of the O command (OO).
  3. Press Enter. The lines that contain the two MM commands and all of the lines between them are moved to the new location.
Note: Only blank characters in the lines specified with O or OO 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.

To move lines to another data set or member:

  1. Type either CREATE or REPLACE on the command line.
  2. Use one of the forms of the M command described previously.
  3. Press Enter.
  4. On the next panel, type the name of the data set or member that you want to create or replace.
  5. Press Enter. The lines are moved to the data set or member that you specified.
Note: To move lines into an existing data set or member without replacing that data set or member, use the MOVE primary or macro command.

Examples

Figure 1 shows how you can move data by using the M with the A (After) line command. To move a line, type M in the line command field of the line you want to move. Type a A in the line command field of the line you want the moved line to follow.

Figure 1. Before the M (Move) line command
Screen dump.

When you press Enter, the editor moves the line where you typed the M command to a position immediately after the line where you typed the A command, as shown in Figure 2. If you press Enter before specifying a destination, the editor displays a MOVE/COPY pending message at the top of the panel. The line is not moved until you specify a destination.

Note: While in MOVE/COPY pending mode, you can issue FIND and LOCATE primary commands, but you cannot use a CHANGE command to change data until after the copy completes.
Figure 2. After the M (MOVE) line command
Screen dump.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014