Previous Topic: Copy Line CommandNext Topic: DELETE Command


Operand Definitions

Operand

Description

C

Specifies a single line to copy. You must specify a destination indicated by A or B with each C line command. The destination can occur before or after the C line command.

CC

Used in pairs to indicate both the start and end of the range of lines to copy. You must specify a destination indicated by the line command A or B with each delimited range of lines. The destination can occur before or after the range.

After specifying the start of a range with the CC line command, you can scroll the region forward or backward and perform other line commands.

A (After) Copies a line or a range of lines immediately after the line containing the A line command.

B (Before) Copies a line or a range of lines immediately before the line containing the B line command.

n (Optional) Specifies the number of times (from 1 through 100) the line or range of lines is inserted at the specified location.

The SET EDIT MULTIPLIER command determines whether n is placed to the left or right. For example:

If multiplier is set with:

then you specify:

SET EDIT MULTIPLIER RIGHT

A7 or B7

SET EDIT MULTIPLIER LEFT

7A or 7B

You can mark only one destination (for a move or a copy) at any one time.

The inserted lines are assigned sequence numbers in increments of one, starting from the previous existing line. When the number of inserted lines exceeds the number of integers between the sequence numbers of the existing lines, the sequence numbers on the lines following the insertion are changed.

Example

The following example illustrates copying a range of lines, 200 to 900, to a new location before line 1500.

=>

....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+.... IDEAL: PROCEDURE DEFINITION PGM EMPLST (001) TEST SYS: DEM FILL-IN Command....+....1....+....2....+....3....+....4....+....5....+....6....+....7.. ====== ================================ T O P ================================= 000100 SELECT CC0200 WHEN $ENTER-KEY 000300 FOR EMPLOYEE 000400 WHERE EMPLOYEE.NUMBER = DISPANEL.NUMBER 000500 MOVE DISPANEL TO EMPLOYEE BY NAME 000600 WHEN NONE 000700 SET DISPANEL.MSG = 'EMPLOYEE DELETED' 000800 SET ATTR HIGHLIGHT TEMP ON DISPANEL.NUMBER CC0900 ENDFOR 001000 SET NEXT_PANEL = 'DISPANEL' 001100 WHEN $PF11 001200 SET NEXT_PANEL = 'EMPMENU' 001300 WHEN $PF12 001400 DO TERMINATE_SES B01500 WHEN OTHER 001600 SET DISPANEL.MSG = 'UNABLE TO INTERPRET KEY ENTERED' 001700 SET NEXT_PANEL = 'DISPANEL' 001800 ENDSEL

The original lines retain their position while a copy of the lines is inserted before line 1500.

=>

....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+.... IDEAL: PROCEDURE DEFINITION PGM EMPLST (001) TEST SYS: DEM FILL-IN Command....+....1....+....2....+....3....+....4....+....5....+....6....+....7.. ====== ================================ T O P ================================= 000100 SELECT 000200 WHEN $ENTER-KEY 000300 FOR EMPLOYEE 000400 WHERE EMPLOYEE.NUMBER = DISPANEL.NUMBER 000500 MOVE DISPANEL TO EMPLOYEE BY NAME 000600 WHEN NONE 000700 SET DISPANEL.MSG = 'EMPLOYEE DELETED' 000800 SET ATTR HIGHLIGHT TEMP ON DISPANEL.NUMBER 000900 ENDFOR 001000 SET NEXT_PANEL = 'DISPANEL' 001100 WHEN $PF11 001200 SET NEXT_PANEL = 'EMPMENU' 001300 WHEN $PF12 001400 DO TERMINATE_SES 001401 WHEN $ENTER-KEY 001402 FOR EMPLOYEE 001403 WHERE EMPLOYEE.NUMBER = DISPANEL.NUMBER 001404 MOVE DISPANEL TO EMPLOYEE BY NAME 001405 WHEN NONE 001406 SET DISPANEL.MSG = 'EMPLOYEE DELETED' 001407 SET ATTR HIGHLIGHT TEMP ON DISPANEL.NUMBER 001408 ENDFOR 001500 WHEN OTHER 001600 SET DISPANEL.MSG = 'UNABLE TO INTERPRET KEY ENTERED' 001700 SET NEXT_PANEL = 'DISPANEL' 001800 ENDSEL