Download Print this page

HP 3000 Manual page 157

Mpe/ix computer systems, rpg/xl utilities
Hide thumbs Also See for 3000:

Advertisement

COPY
COPY allows you to duplicate lines in a file.
Form
COP[Y] lb [/le] TO loc [BY inc]
Parameter Explanation
lb
First--or only--line you wish to have copied.
le
Last line of a group of lines you are copying elsewhere.
TO loc
Location where the lines will be copied. The location cannot be within the range of lines spec-
ified "lb/le" after COPY. If the destination line exists, the lines will be copied starting at the
next line in sequence.
BY inc
Increment value by which you want the lines copied. If the number of lines to be copied can-
not fit from line "loc" to the next existing higher line number, the copy is not performed. Us-
ing an increment value of less than 1 allows you to concentrate more lines in a restricted
location. RISE will automatically calculate a smaller increment value to concentrate more
lines in a restricted area when it is possible.
Purpose
The COPY command allows you to duplicate lines from one location to a new location in the work file. The
original lines remain where they were after the COPY command is executed.
*
Execution mode:
*
Record Pointer:
*
Control Y:
Examples
The following are legal abbreviations which may be used with the COPY command and its parameters:
COP 10 TO LAST
Duplicate line 10 beginning after the last line of the existing file.
COP1/10
Copy lines one through ten to line twenty with an
TO20BY.2
increment value of 0.2.
In the first example, an attempt to copy lines to a location within the range of lines being copied generates
an error (1).A second error results when the range of lines to be copied is incorrectly entered (2). The third
error occurs when no "TO" location is specified for the copy command (3).
Finally, a legal command causes lines 1/5 to be duplicated starting at the first line following the last line in
the existing file (4).
(1) >COPY
1/10 TO 5
Error 151:
(2) >COPY 5/1 TO 10
Line or Block.
At last original line that was duplicated.
Stops the listing of lines that are being copied.
TO location cannot be within line range.
2- 159

Advertisement

loading