HP RPG/iX Utilities Reference Manual (30318-90006)

2- 192
Form
MOV[E] lb[/le] TO loc [BY inc]
Parameter Explanation
lb Single line you wish to move or the beginning of a range of lines you are moving.
le Last line of range you wish to move.
TO loc Location where the lines are to appear. If destination line exists, the lines will be moved start-
ing at the next line in sequence.
BY inc Increment of line numbers you wish to use. If "BY inc" isn't specified, the current default in-
crementisused If you attempt tomovetoomanylinesintoarestrictedposition, the move may
be blocked by the next higher line number. When this occurs, none of the lines are moved.
Purpose
The MOVE command transfers a line or lines to a designated location.
Related Commands
The COPY command duplicates a line or lines in a new position while leaving the original lines where they
are. The MOVE command does not leave lines in their original position; they are physically transferred.
* Execution mode: Line or Block.
* Record pointer: At the line following the last line that was moved.
* Control Y: Stops the listing of lines being moved.
Examples
The following are legal abbreviations which may be used with the MOVE command and its parameters:
MOV 10 TO 20 Move line 10 to line 20. (If data has been entered on
line 20, RISE will move 10 to the next higher line by
automatically creating an increment such as 20.1 if that is possible.)
MOV *-5/*+5 to Move a range of lines beginning 5 lines before the
*+20 current record pointer to a position 20 lines after the
current record pointer.
MOV F TO LAST Move the first line to the last line in the file.
In the first example, SIMCAL is copied into a work file using the TEXT command, and five lines are
brought to the screen using LIST (1). The MOVE command is then used to move line 2 to line 3.5 (2). The
results are automatically displayed (3). Lines 1 through 5 are then LISTed (4).
>T SIMCAL
Text completed.
(1) >L 1/5
1 00011H
SIMCAL
2 00012FINPUT IP F 72 DISK
3 00013FOUTPUT O F 72 DISK
4 00014IINPUT AA 01 1 CA
5 00015I OR 02 1 CS
(2) >MOVE 2 TO 3.5
3.5 00012FINPUT IP F 72 DISK
(3) Move completed.