|
The
COPY primary command copies a sequential data set, a member of a partitioned
data set, or z/OS® UNIX file into the data being edited.
If
no options are specified with the COPY command, the Edit/View Copy
panel is displayed.
Syntax
>>-COPY--+------------------+----------------------------------><
'-| copy_options |-'
copy_options
|--+-member---------+--+-----------------------+---------------->
+-(member)-------+ | (1) |
+-dsname---------+ '-+-AFTER--+--label-----'
+-dsname(member)-+ '-BEFORE '
'-pathname-------'
>--+----------------------+--+--------+-------------------------|
'-start_line--end_line-' +-ASCII--+
+-EBCDIC-+
'-UTF8---'
Notes: - If you don't specify the position using a label, you must
specify the position by using an A or B line command.
- member
- A member of the ISPF library or partitioned data set that you
are editing. 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 name.
- dsname
- A partially qualified or fully qualified data set name. If the
data set is partitioned you can include a member name in parentheses
or select a member from a member list.
- pathname
- The path name for a z/OS UNIX regular file or directory.
If a directory is specified, a directory selection list is displayed,
allowing you to select the 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, data set, or z/OS UNIX file
to be included in the range of lines to be copied. Must be greater
than or equal to 1, and less than or equal to the number of lines
in the member, data set, or z/OS UNIX file. To specify standard,
ISPF, or COBOL line numbers, omit the member name, data set name,
or z/OS UNIX file name to use the Extended Edit Copy
panel.
- end_line
- The number of the last line to be included in the range of lines
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, data set,
or z/OS UNIX file.
- 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.
The label can be either
a label that you define or one of the PDF editor-defined labels, such
as .ZF and .ZL.
If you have
not defined a label and the ISPF editor-defined labels are not appropriate
for your purpose, use the A (after) or B (before) line command to
specify where the data is to be copied.
If the data set or
member that you are editing is empty, you do not need to specify a
destination for the data being copied.
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.
Description COPY
adds a copy of data that already exists to the data set, member, or z/OS UNIX file
that you are editing. Use MOVE if you want to move data from one data
set, member, or z/OS UNIX file to another, rather than
just copy it.
To copy data into an empty data set, member,
or z/OS UNIX file:
- On the command line, type:
COPY member
or:
COPY dsname
or:
COPY pathname
The
member, data set name, or path name operand is optional. If you do
not specify the name of a member, data set, or z/OS UNIX file
to be copied, the Edit Copy panel appears. Enter the name of the data
set, member, or z/OS UNIX file on this panel.
You
can specify the numbers of the first and last lines to be copied,
along with the kind of line numbers (standard, ISPFSTD, COBOL, or
relative) on the Edit Copy panel. This allows you to copy only part
of the data set or member.
Note: When you select ISPFSTD line
numbers and the STATS mode is ON, the editor uses the first 6 digits
and ignores the 2-digit modification number. When the STATS mode is
OFF, the editor uses all 8 digits.
- Press Enter. The data is copied.
To copy data into a data set, member,
or z/OS UNIX file that is not empty:
- On the command line, type:
COPY member AFTER | BEFORE label start_line end_line
or:
COPY dsname AFTER | BEFORE label start_line end_line
or:
COPY pathname AFTER | BEFORE label start_line end_line
The member, dsname,
or pathname operand is optional. You should
omit the member name only if you do not know the member name, or if
you are going to copy a sequential data set, z/OS UNIX file,
or a member of a different partitioned data set.
The AFTER label and
BEFORE label operands are also optional.
However, if the data set, member, or z/OS UNIX file that is to receive the
copied data is not empty, you must specify a destination for the copied
data. Therefore, if you do not want to use a label, you can substitute
either the A (after) or B (before) line command as the destination
of the copied data. However, a number indicating that the A or B command
should be repeated cannot follow the line command. See the descriptions
of these commands for information about them.
If the data
set, member, or z/OS UNIX file is not empty and you do
not specify a destination, a "MOVE/COPY Pending" message appears
in the upper-right corner of the panel and the data is not copied.
When you type a destination and press Enter, the data is copied.
- Press Enter. If you entered the name of a member, data set, or z/OS UNIX file,
the member, data set, or z/OS UNIX file is copied. Otherwise,
the edit copy panel appears. If a range of line numbers is specified,
only those lines are copied. See the previous example for more information.
See Copying and moving data if
you need more information.
Examples These steps show how you can copy
data when you omit the member name and the ISPF editor panels appear:
- Type COPY on the command line and specify the
destination of the operation. The panel in Figure 1 shows
you that the data is to be copied after line 000700,
as specified by the A (after) line command.
Figure 1. Member before data is copied File Edit Edit_Settings Menu Utilities Compilers Test Help
───────────────────────────────────────────────────────────────────────────────
EDIT P020136.PRIVATE.PLS(INTO) - 01.00 Columns 00001 00072
Command ===> copy Scroll ===> CSR
****** ***************************** Top of Data ******************************
000100
000200 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
000300
000400 THIS IS THE MEMBER INTO WHICH THE LINES ARE TO BE COPIED.
000500
000600 +---------------------+
a 0700 | |
000800 | |
000900 | |
001000 | |
001100 +---------------------+
001200
001300 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
001400
****** **************************** Bottom of Data ****************************
F1=Help F2=Split F3=Exit F5=Rfind F6=Rchange F7=Up
F8=Down F9=Swap F10=Left F11=Right F12=Cancel
- When you press Enter, the Edit Copy panel appears. Specify the
data you want copied.
The example in Figure 2 copies
the data set member named COPYFROM. Since you are using the Edit/View
- Copy panel, you can also specify the first and last lines you want
copied.
Figure 2. Edit/View - Copy panel (ISRECPY1) Menu RefList Utilities Help
───────────────────────────────────────────────────────────────────────────────
Edit/View - Copy
Command ===> _________________________________________________________________
More: -
Project . . . PROJ1
Group . . . . USERID . . . ________ . . . ________ . . . ________
Type . . . . CLIST
Member . . . (Blank or pattern for member selection list)
From Other Partitioned or Sequential Data Set, or z/OS UNIX file:
Data Set Name . . _________________________________________________________
Volume Serial . . ______ (If not cataloged)
Data Set Password . . (If password protected)
Line Numbers (Blank for entire member or seq. data set)
First line . . . . ________
Last line . . . . . ________
Number type . . . . ________ (Standard, ISPFstd, COBOL, or Relative)
Data Conversion option
1. EBCDIC
2. ASCII
3. UTF-8
Press Enter key to copy, enter End command to cancel copy.
F1=Help F2=Split F3=Exit F7=Backward F8=Forward F9=Swap
F10=Actions F12=Cancel
- Figure 3 shows the contents of the
COPYFROM member, which is copied into the original data set.
Figure 3. Contents of member to be copiedEDIT P020136.PRIVATE.PLS(COPYFROM) - 01.00 Columns 00001 00072
****** ***************************** Top of Data ******************************
000100 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
000200 These are the lines that are to be copied.
000300 These are the lines that are to be copied.
000400 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
****** **************************** Bottom of Data ****************************
⋮
- When you press Enter, the editor copies the data and displays
a short message in the upper right side of the panel. Figure 4 shows the result of the copy operation.
Figure 4. Member after data has been
copied File Edit Edit_Settings Menu Utilities Compilers Test Help
───────────────────────────────────────────────────────────────────────────────
EDIT P020136.PRIVATE.PLS(INTO) - 01.00 Member COPYFROM copied
Command ===> Scroll ===> CSR
****** ***************************** Top of Data ******************************
000100
000200 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
000300
000400 THIS IS THE MEMBER INTO WHICH THE LINES ARE TO BE COPIED.
000500
000600 +---------------------+
000700 | |
000710 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
000720 These are the lines that are to be copied.
000730 These are the lines that are to be copied.
000740 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
000800 | |
000900 | |
001000 | |
001100 +---------------------+
001200
001300 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
F1=Help F2=Split F3=Exit F5=Rfind F6=Rchange F7=Up
F8=Down F9=Swap F10=Left F11=Right F12=Cancel
|