Migrating VSE/VSAM Files to Another Device

File Migration Using BACKUP and RESTORE

Note: VSAM will tolerate the use of IDCAMS BACKUP/RESTORE for migration from a non-SCSI device to a SCSI device, or vice versa. However, not every cluster can be migrated in this manner. In these cases, IDCAMS EXPORT/IMPORT must be used instead. EXPORT/IMPORT is the recommended method of data migration.
The VSE/VSAM Backup/Restore Function can back up the following objects and their catalog information onto tape or disk volumes:
  • Key-sequenced data sets (KSDS)
  • Entry-sequenced data sets (ESDS)
  • Relative-record data sets (RRDS)
  • Variable-length relative record data sets (VRDS)
  • Alternate indexes (AIX®)
  • SAM ESDS files in CI format

Empty objects can be backed up and restored. An empty object is an object that was defined using the NOALLOCATION parameter, an object that has never been loaded with data, or an object that has not been loaded since reset. Although they cannot be specified in the command, paths are backed up and restored automatically when their respective path entry clusters are backed up or restored.

VSE/VSAM Backup/Restore supports backing up onto tape and disk, and restoring from tape and disk; this support applies to all tape and disk devices that are supported by z/VSE.

You can back up and restore multiple objects with a single command. If you specify BACKUP (*), all objects defined in a specific catalog will be backed up. If you specify RESTORE (*), all objects residing in a specific backup file are restored. You can also specify generic names representing groups of related objects to be backed up or restored. Because the generic specification may include objects you do not want backed up or restored, you can exclude objects by specifying either their entry names or other generic names. For information on the use of generic names for back up and restore, refer to the VSE/VSAM Commands under:
  • Using BACKUP and RESTORE
  • Generic Names

To copy objects from one volume to another volume of a different device type, specify the volser representing the new volume in the RESTORE command.

Other Methods of File Migration

In addition to Backup/Restore, there are three ways to move VSE/VSAM files from one volume to another. They may or may not require moving from one catalog to another.

  • DEFINE/REPRO:
    • To move files between two volumes owned by different catalogs, DEFINE every file on the new volume, using its old name. REPRO every file onto the new volume, and delete it from the old one.
    • To move files between two volumes owned by the same catalog, DEFINE every file on the new volume, using a temporary name that is not already in the catalog. REPRO every file onto the new volume, and delete it from the old volume. Using ALTER, rename the new copy with the name the file had on the old volume.

    In both cases, alternate indexes can be copied. You must redefine all paths for the new copy.

  • EXPORT/IMPORT:

    With EXPORT/IMPORT, every file to be migrated is first exported to a temporary SAM file (tape or disk). For EXPORT PERMANENT, this frees the space (and volumes if all files on them are exported) that is potentially reusable during the IMPORT phase.

    To ensure the desired space allocation, DEFINE the files importing them. If files are imported but not defined, too much or too little space may be allocated to them. Then IMPORT the files.

    Unique files require extent values specified on an EXTENT statement. Path definitions are implicitly transferred.