Move

PurposeMOVE moves a line or range of lines to a different location. MOVE deletes the lines from the original location and moves them to the specified position.  If necessary, MOVE adjusts the line numbers of the current lines to make room for the inserted lines.

Syntax

M/OVE/ line1 [:line2] TO line3

line1

is the line to be moved, or the first line in a line range to be moved.

line2

is the last line in a range of lines to be moved.

TO line3

specifies the line at which the lines are to be inserted.  A comma (,) can be used instead of TO.  If line3 is an already existing line number, the moved text will be inserted after that line number.  If line3 references a non-existing line number, the moved text will be inserted at the newly created line number.

Example

--PRINT
00100  AUTHOR_CODE,CHAR,11
00110  TITLE_CODE,CHAR,6
00120  AUTHOR_ORDERED,INT,6
00130  ROYAL_PERCENT,INT,3
--MOVE 120:130,100
--PRINT
00100  AUTHOR_CODE,CHAR,11
00101  AUTHOR_ORDERED,INT,6
00102  ROYAL_PERCENT,INT,3
00110  TITLE_CODE,CHAR,6
--

NOTES:  MOVE renumbers the lines, incrementing them by one, so that the sequence of line numbers is in ascending order where they are inserted.  If necessary, MOVE changes numbers of following lines, incrementing them by one, until there is room for all intervening lines to have ascending numbers.