Previous Topic: RENAME FunctionNext Topic: SCAN Function


RESTORE Function

RESTORE restores a VLS file from the backup (sequential) version you created with the BACKUP function. The backup file has a ddname of VLSBKUP. The system should be QUIESED (down) when you execute a RESTORE.

►►─ RESTORE ─┬──────────────┬─────────────────────────────────────────────────►◄
             ├─ NOCLEAR ────┤
             └─ NOCLEAR(R) ─┘
RESTORE

Specifies the RESTORE function. If you specify RESTORE alone, all the members in the VLS library are destroyed before the backup file is loaded.

NOCLEAR

Combines the contents of two libraries. RESTORE NOCLEAR preserves the existing contents of the VLS library. An error is generated if a member to load from the backup file has the same name as a member that is already in the library.

NOCLEAR(R)

Preserves the existing contents of the VLS library, but allows member replacement. If a member to load from a backup file has the same name as a member in the library, the existing member is replaced and no error is generated.

Example

Use the following sample JCL to restore a backup VLS file:

// EXEC PGM=VLSUTIL
//STEPLIB DD DSN=LOAD,DISP=SHR
//        DD DSN=LOAD,DISP=SHR
//        DD DSN=LOAD,DISP=SHR
//SYSPRINT DD SYSOUT=A
//VLSBKUP DD DSN=dsname,DISP=OLD,(VLSBKUP name)
//VLSFILE DD DSN=dsname,DISP=SHR (VLS library)
//SYSIN DD *
[FORMAT [BLKSIZE=bbbb][,NAMELEN=nn]]
RESTORE
/*

In this example, the FORMAT function is optional. The BLKSIZE value can be smaller or larger than the BLKSIZE value of the original file. The NAMELEN value can be larger, but not smaller. If you do not intend to change either of these values and if your VLS library control blocks are undamaged, omit the FORMAT function to save time. You must omit the FORMAT function if you intend to specify RESTORE NOCLEAR or RESTORE NOCLEAR(R). For more information on how to model your JCL, refer to descriptions of the BACKUP and FORMAT functions.