EDIT—COPY subcommand operands
- line_1
- specifies the first line or the lower limit of the range to be copied. If the specified line number does not exist in this data set, the range begins with the next higher line number.
- line_2
- specifies the last line or the upper limit of the range to be
copied. If the specified line number does not exist in this data set,
the range ends with the highest line number that is less than line_2.
If line_2 is not entered, the value defaults to the value
of line_1; that is, the source becomes one line. Do not
enter an asterisk for line_2.
If COPY is followed by two line number operands, the system assumes them to represent line_1 and line_3, and defaults line_2 to the value of line_1.
- line_3
- specifies the target line number; that is, the line at which
the copied-to data area starts. If the line_3 value corresponds
to an existing line, the target line is changed to line_3 +
INCR(lines) and either becomes a new line or displaces an
existing line at that location. When the copy operation begins, existing
lines encountered in the target area are renumbered to make room for
the incoming data. The increment for renumbered lines is one (1).
Specifying zero (0) for line_3 puts the copied data at
the top of the data set, only if line 0 is empty. If line 0 has data,
enter TOP followed by COPY with line_3 set to *. Note
that line_3 defaults to *.
The value of line_3 should not fall in the range from line_1 to line_2. The target line must not be in the range being copied. Exception: Line_3 can be equal to line_2.
- *
- represents the value of the current line pointer.
- INCR(lines)
- specifies the line number increment to be used for this copy
operation. The default is the value in effect for this data before
the copy operation. When the copy operation is complete, the increment
reverts to the value in effect before COPY was issued. Range: 1-8
decimal digits, but not zero.
The increment for any renumbered lines is one (1).
- ‘string’
- specifies a sequence of alphanumeric characters with a maximum length equal to or less than the logical record length of the data set you are editing. When a character string is specified, a search starting at the current line is done for the line containing the string. When found, that line is the start of the range to be copied for either numbered or unnumbered data sets.
- count
- specifies the total number of lines (the range) to be copied.
Enter 1-8 decimal digits, but not zero (0) or asterisk (*). The
default for count depends on what is specified for ‘string’
(‘string’ or *). If ‘string’ is
specified and count is left blank, the default for count is
one (1). For example, if you specify:
the count default is one (1).COPY 'xyz' 99However, if you specify an asterisk (*) for the ‘string’, the next operand is treated as the count operand. For example, if you specify:
the count is 99.COPY * 99 - line_4
- applies to both numbered and unnumbered data sets. For unnumbered
data sets, line_4 specifies the target line (the line
at which the copied-to data area starts) as a relative line number
(the nth line in the data set). For numbered
data sets, line_4 is specified the same as line_3.
Specifying zero (0) for line_4 puts the copied data at
the top of the data set, only if line (0) is empty. If line (0) has
data, enter TOP followed by COPY with line_4 set to *.
The default for line_4 is *. However, if ‘string’
is specified and count is left blank, the operand following ‘string’
is treated as the count operand and the line_4 default
(*) is used. For example, if you specify :
the count is 99 and line_4 is *.COPY 'xyz' 99