Use the REPRO command to create a duplicate data set for back up.
For information about using REPRO, see Copying and Merging Data Sets.
Using REPRO for backup and recovery has the following advantages:
- Backup copy is accessible. The backup copy
obtained by using REPRO is accessible for processing. It can be a
VSAM data set or a sequential data set.
- Type of data set can be changed. The backup
copy obtained by using REPRO can be a different type of data set than
the original. For example, you could back up a VSAM key-sequenced
data set by copying it to a VSAM entry-sequenced data set. A compressed
VSAM key-sequenced data set cannot be copied to a VSAM entry-sequenced
data set using REPRO. The data component of a compressed key-sequenced
data set cannot be accessed by itself.
- Key-sequenced data set or variable-length RRDS
is reorganized. Using REPRO for backup results in data reorganization
and the recreation of an index for a key-sequenced data set or variable-length
RRDS. The data records are rearranged physically in ascending key
sequence and free-space quantities are restored. (Control interval
and control area splits can have placed the records physically out
of order.) When a key-sequenced data set is reorganized, absolute
references using the relative byte address (RBA) are no longer valid.
If you are accessing a data set using RLS, see Using VSAM Record-Level Sharing.
REPRO provides you with several options for creating backup copies
and using them for data set recovery. The following are suggested
ways to use REPRO:
- Use REPRO to copy the data set to a data set with a different
name.
Either change your references to the original copy or delete
the original and rename the copy.
- Create a backup copy on another catalog, then use the backup copy
to replace the original.
- Define a data set on another catalog, and use REPRO to copy the
original data set into the new data set you have defined.
- You can leave the backup copy in the catalog it was copied to
when you want to replace the original with the backup copy. Then,
change the JCL statements to reflect the name of the catalog that
contains the backup copy.
- Create a copy of a nonreusable VSAM data set on the same catalog,
then delete the original data set, define a new data set, and load
the backup copy into the newly defined data set.
- To create a backup copy, define a data set, and use REPRO to copy
the original data set into the newly defined data set. If you define
the backup data set on the same catalog as the original data set or
if the data set is SMS managed, the backup data set must have a different
name.
- To recover the data set, use the DELETE command to delete the
original data set if it still exists. Next, redefine the data set
using the DEFINE command, then restore it with the backup copy using
the REPRO command.
- Create a copy of a reusable VSAM data set, then load the backup
copy into the original data set. When using REPRO, the REUSE attribute
permits repeated backups to the same VSAM reusable target data set.
- To create a backup copy, define a data set, and use REPRO to copy
the original reusable data set into the newly defined data set.
- To recover the data set, load the backup copy into the original
reusable data set.
- Create a backup copy of a data set, then merge the backup copy
with the damaged data set. When using REPRO, the REPLACE parameter
lets you merge a backup copy into the damaged data set. You cannot
use the REPLACE parameter with entry-sequenced data sets, because
records are always added to the end of an entry-sequenced data set.
- To create a backup copy, define a data set, and use REPRO to copy
the original data set into the newly defined data set.
- To recover the data set, use the REPRO command with the REPLACE
parameter to merge the backup copy with the destroyed data set. With
a key-sequenced data set, each source record whose key matches a target
record's key replaces the target record. Otherwise, the source record
is inserted into its appropriate place in the target cluster. With
a fixed-length or variable-length RRDS, each source record, whose
relative record number identifies a data record in the target data
set, replaces the target record. Otherwise, the source record is inserted
into the empty slot its relative record number identifies. When only
part of a data set is damaged, you can replace only the records in
the damaged part of the data set. The REPRO command lets you specify
a location to begin copying and a location to end copying.
- If the index of a key-sequenced data set or variable-length RRDS
becomes damaged, follow this procedure to rebuild the index and recover
the data set. This does not apply to a compressed key-sequenced data
set. It is not possible to REPRO just the data component of a compressed
key-sequenced data set.
- Use REPRO to copy the data component only. Sort the data.
- Use REPRO with the REPLACE parameter to copy the cluster and rebuild
the index.
Restrictions: - You must connect all referenced catalogs to the system master catalog.