The COPY macro command copies a
sequential data set, a member of a partitioned data set, or a z/OS® UNIX file
into the data are editing.
Syntax
Macro command syntax
>>-ISREDIT--COPY--+-member---------+--+-AFTER--+--label--------->
+-(member)-------+ '-BEFORE-'
+-dsname---------+
+-dsname(member)-+
'-pathname-------'
>--+--------------------------+--+--------+--------------------><
'-start_line--+----------+-' +-ASCII--+
'-end_line-' +-EBCDIC-+
'-UTF8---'
- member
- A member of the ISPF library or partitioned data set that you
are editing. Either member or data set name are required parameters.
- dsname
- A partially or fully qualified data set name. If the data set
is partitioned, you must include a member name in parentheses. If
a name of eight or fewer characters is specified and it could be a
member name or a data set name, COPY searches for a member name first.
If no member is found, then the name is used as a data set. Either
data set name or member are required parameters.
- pathname
- The path name for a z/OS UNIX regular file to be copied.
(Also, see Specifying z/OS UNIX pathnames with edit primary and macro commands.)
- AFTER
- The data is copied after the line with the specified label.
- BEFORE
- The data is copied before the line with the specified label.
- label
- Label identifying the line where the data is to be copied. It
can be either a label that you define or one of the editor-defined
labels, such as .ZF or .ZL.
- start_line
- The number of the first line of the member to be copied. Must
be greater than or equal to 1, and less than or equal to the number
of lines in the member.
- end_line
- The number of the last line of the member to be copied. Must be
greater than or equal to start_line and
less than or equal to the number of lines in the member. If not specified,
the last line of the member is used.
- ASCII, EBCDIC, UTF8
- When one of these keywords is supplied, if the data is using a
different character set to that designated by the keyword, the data
being copied in from the external file is converted from the character
set designated by the keyword to the character set specified for the
file being edited or to the terminal character set.
Note: If the member name
or data set name is less than 8 characters and the data set you are
editing is partitioned a like-named member is copied. If a like-named
member does not exist the name is considered to be a partially qualified
data set name.
Return codes
- 0
- Normal completion
- 8
- End of data reached before last record read
- 12
- Invalid label or linenum;
member not found or BLDL error
- 16
- End of data reached before first record of specified range was
reached
- 20
- Syntax error (invalid name, incomplete range), or I/O error.
Examples
To copy all of the member MEM1
at the end of the data:
ISREDIT COPY MEM1 AFTER .ZLAST
To
copy all of data set MOVECOPY.DATA before the first line of data:
ISREDIT COPY MOVECOPY.DATA BEFORE .ZFIRST
To
copy the first three lines of the member MEM1 before the first line
of data:
ISREDIT COPY MEM1 BEFORE .ZF 1 3