MOVE num1 [num2] M
Related command: prefix command MOVE
The command MOVE moves one or more records behind the record of the current line of the workfile. The records to be moved are referred to by a symbolic number or the line number.
The record number may be specified without leading zeros. Symbolic record numbers resp. line numbers are:
First number larger than second
If you specify a number that does not exist in your workfile, you receive the message
Number ... not found
The ... are replaced by the number in the output.
Besides, you have to take care that the area to be moved does not contain the target; the target is the place between the current record and the following record. As a consequence, the area to be moved must not contain the current line and the line following it at the same time. This would be the case in the example MOVE * num2 with num2 behind the current line. If you do not comply to these restrictions, you will receive the message
Target in MOVE area
Some examples:
m400 700 | moves the records with the numbers 400 to 700 behind the record of the current line. | |
mo b | moves the last record. | |
m p | moves the record before the record of the current line behind the record of the current line, i.e. interchanges the two records. |
You cannot move the top line