MOVE—Move Data
The MOVE primary command moves a sequential data set, member of a partitioned data set, or z/OS® UNIX file into the data being edited.
If no options are specified with the MOVE command, the Edit/View Move panel is displayed.
Syntax
- 1 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 you are editing.
- 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 pathname 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 moved. (Also, see Specifying z/OS UNIX pathnames with edit primary and macro commands.)
- AFTER
- The data is moved after the line with the specified label.
- BEFORE
- The data is moved 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.
- 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 moved 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 you define or one of the editor-defined labels, such as .ZF
and .ZL
.
If you have not defined a label and the editor-defined labels are
not appropriate for your purpose, use the A (after) or B (before)
line command to specify the data's destination.
If the data set, member, or z/OS UNIX file that you are editing is empty, you do not need to specify a destination for the data being moved.
Description
MOVE adds 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 rather than copy it from one data set, member, or z/OS UNIX file to another.
The member, sequential data set, or z/OS UNIX file is deleted after the move. For a concatenated sequence of ISPF libraries, the deletion occurs only if the member was in the first library.
To move data into an empty data set, member, or z/OS UNIX file:
- On the command line, type:
MOVE member
or:
MOVE dsname
or:
MOVE pathname
The member, dsname, and path name operands are optional. If you do not specify the name of a member, data set, or z/OS UNIX file to be moved, the Edit Move panel appears. Enter the data set, member name, or z/OS UNIX file on this panel.
- Press Enter. The data is moved.
To move data into a data set, member, or z/OS UNIX file that is not empty:
- On the command line, type:
MOVE member AFTER | BEFORE label
or:
MOVE dsname AFTER | BEFORE label
or:
MOVE pathname AFTER | BEFORE label
The member, dsname, and path name operands are optional.
The AFTER label and BEFORE label operands are optional, also. However, if the data set, member, or z/OS UNIX file that is to receive the moved data is not empty, you must specify a destination for the moved data. Therefore, if you do not use a label, substitute either the A (after) or B (before) line command as the destination of the moved data. However, a number indicating that the A or B command should be repeated cannot follow the line command.
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 is displayed in the upper-right corner of the panel and the data is not moved. When you type a destination and press Enter, the data is moved. - 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 moved. Otherwise, the Edit Move panel appears. See the previous example for more information.
See Copying and moving data if you need more information.
Examples
These steps show how you can move data when you omit the member name and the editor panels appear:
- Type
MOVE
on the command line and specify the destination of the operation. In Figure 1, the data is to be moved after line000400
, as specified by the A (after) line command. - When you press Enter, the Edit/View Move panel appears. Specify
the data you want moved.
This example (Figure 2) moves the data set member named TODATA.
- Figure 3 shows the contents of the TODATA member which is moved into the original data set. This panel is shown only for this example, so you can see the data that is being moved. It is not displayed during a move sequence.
- When you press Enter, the editor moves the data and displays a short message in the upper right corner of the panel. Figure 4 shows the result of using MOVE.