next previous up contents index
Next: NEXT Previous: MANUAL Up: The Commands in Detail


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:

If you specify only one number, only this record is moved; if you specify two numbers, the records from the first to the second number (including the borders) are moved. For this purpose num1 <= num2 has to be valid. If that is not the case, you receive the message

If you specify a number that does not exist in your workfile, you receive the message

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

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.
Please, note that the top line cannot be moved. The command MOVE T 500 will result in the message

The records moved receive numbers that go well with the already existing numbers before and after the inserted records. Since the procedure to determine the new numbers is the same for several commands, it is explained only once in the section Inserting Record Numbers.
next previous up contents index
Next: NEXT Previous: MANUAL Up: The Commands in Detail