CMOVE [(l1) [l2])] c1 [c2] COLUMN [+|-]col [LINE [+|-]num] [n] CM
CMOVE means column move, i.e. it moves columns of a line. It should not be confused with the command MOVE, which moves lines.
cmove 5 column 20
cmove 5 10 col 20
Moving works as follows: The columns starting with the target column are moved to the right by the number of columns to be moved. The characters to be moved are written into the gap just produced and then deleted at their original place. The gap produced by this is closed again by moving to the left the characters at the right side of the gap. In the example cmove 5 10 col 20 the characters to be moved can afterwards be found in columns 14 to 19, because they have been moved "between" the original columns 19 and 20. This is the same method that is used with the command MOVE, which also does not overwrite but inserts the moved data and leaves no gap at the move source.
Source and target area may not overlap. If they do, you receive the message
Source and target area overlap
cmove 5 10 c +15
Until now, the commands were limited to the current line. As usual, you can have the command applied to n following lines by specifying a number as last parameter:
cmove 5 10 colu 20 7
End of data
cmove (500 1200) 5 10 c20
About the last parameter of CMOVE: Until now, the target columns have been in the same line as the source columns were, but you can also specify the target columns separately:
cm5 10c20 line 700
As with the COLUMN specification, you can precede the LINE specification with a leading sign, thus making the column specification a relative one:
cm5 10c20 l-6
Target record not found
cmove (500 b) 8 column 9 line 000400
CMOVE allows for whole rectangles of the workfile to be moved to another part of the workfile.