Syntax


M[n]

MM / MM[n]



Operands


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   For the MM command, n is the number of copies of the MM block to be moved, which is assumed to be 1 if omitted. 


The n operand cannot be used on the MM command if it is participating in a line swap with a W/WW block.


Description


Note: The C/CC and M/MM line commands are also used to mark lines for the use of various primary commands. When used for this purpose, you may not also enter other non primary related line commands during the same interaction. e.g. if using CC/CC to mark a range of lines for use by the CREATE primary command, you may not, at the same time, enter other line commands such as I Insert, D Delete, etc. 

 

When used to "mark off" a line range for use by a primary command, CC is usually the line-command of choice. MM can also be used, but it causes the marked range of lines to be deleted after the primary command is performed.


Note:  In order to be ISPF compatible, the FIND command will not use a pending C/CC or M/MM block to define a line range, because of the long-standing custom of ISPF users to keep such blocks pending while using FIND to search for a place into which to move or copy that block. To use FIND and have a C/CC or M/MM block to define a line range, use the FIND alias of FF.


See FIND - Find a Character String for more information.



M/MM can also be used in conjunction with W/WW to swap two blocks of lines. When a swap is performed, the two blocks need not contain the same number of lines.


To move one or more lines within the same file:


    1. Type M in the line command area of the line to be copied. If you also want to move one or more lines that  immediately follow this line, type a number greater than 1 after the M command.


    1. Next, specify the destination of the line(s) to be moved by using either the A (after), AA (After Block), B (before), BB (Before Block) or O (overlay) line command. To swap the destination lines with the lines marked by M, use the W or WW line commands on the destination.


    1. Press Enter.


    1. The line or lines are moved to the new location. If the destination was marked by W or WW, the lines formerly at the destination are now moved to where the M lines had been.

 


To move a block of lines within the same file:  


    1. Type MM in the line command area of both the first and last lines to be copied. You can scroll (or use FIND or LOCATE) between typing the first MM and the second MM, if necessary.


    1. Use the A (after), AA (After Block), B (before), BB (Before Block) 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). To swap the destination lines with the lines marked by MM, use the W or WW line commands on the destination.


    1. Press Enter.


    1. The lines that contain the two MM commands and all of the lines between them are copied to the new location. If the destination was marked by W or WW, the lines formerly at the destination are now moved to where the MM lines had been. 


Note: See Word Processing Support for information about text swaps.


Example of using M/MM and W/WW to swap lines:


Before:



After:


Created with the Personal Edition of HelpNDoc: Converting Word Docs to eBooks Made Easy with HelpNDoc