REPLACE
The REPLACE command writes over an existing data set or member with selected records from the edit data set. A non-partitioned data set or a PDS member may be replaced.
The command is available in the Edit function in Character and Vertical Formatted modes.
data set
Specifies the name of the data set to which records are to be written.
data set(member)
Specifies the PDS data set and member name to which records are to be written.
(member)
To overwrite a member in the same PDS as the member being edited, specify the member name enclosed in parentheses.
Guidelines
Lines to be written to the specified data set or member must be specified with one of the following commands:
- C (copy)
- M (move)
Using the M line command instead of the C line command produces the message: MOVE CHANGED TO COPY.The overwriting proceeds as if the C line command was used and the specified line range is not deleted from the edit data set.
Messages that are produced with the REPLACE command are shown in the following table.
Messages for the REPLACE Command
Message | Reason |
---|---|
ENTER DSNAME | Data set parameter is omitted |
DATASET NOT CATALOGED | Nonexistent data set is specified |
MEMBER (name) CREATED | Nonexistent member is specified and the member is created |
ENTER MEMBER NAME | PDS without a member name is specified |
MEMBER NAME NOT ALLOWED | Unqualified member name is specified |
DATASET REPLACED | Non-partitioned data set is successfully overwritten |
MEMBER (name) REPLACED | PDS member is successfully overwritten |
I/O ERROR ON OUTPUT | Key fields are not in ascending order in overwriting a keyed data set |
CREATE/REPLACE PENDING | REPLACE command entered before a source range of lines is specified |