You can use the Restore Object (RSTOBJ) command to restore one or more objects to a library.
You can use the RSTOBJ command to restore objects that were saved by the Save Library (SAVLIB), Save Object (SAVOBJ), or Save Changed Objects (SAVCHGOBJ) commands. You must restore objects to an existing library. When you restore all objects from data that was saved by the SAVLIB command, the library description is not restored.
There are several parameters on the RSTOBJ command that allow you to specify which objects to restore. Parameters that allow you to select objects from the save media include Objects (OBJ), Saved Library (SAVLIB), Object types (OBJTYPE), Libraries to omit (OMITLIB), Objects to omit (OMITOBJ), Select (SELECT), and File member (FILEMBR). The Restore to library (RSTLIB), Restore to ASP device (RSTASPDEV), and Restore to ASP number (RSTASP) parameters allow you to specify where to restore the objects. The Option (OPTION), Data base member option (MBROPT), and Allow object differences (ALWOBJDIF) parameters allow you to specify whether to restore objects that already exist in the destination library.
You can run multiple concurrent RSTOBJ commands for one or more libraries, if the saved objects are available on different save media.
RSTOBJ OBJ(CLUSTERDTA) SAVLIB(LIBX) DEV(TAP01) OBJTYPE(*DTAARA) VOL(*SAVVOL)
- Tape file sequence number.
The tape file sequence number is the quickest way to locate the tape file that contains the wanted objects.
- Specific object name and type.
The specific object name and specific object type, when specified, causes the restore operation to stop searching when the wanted object is found. If *ALL, a generic name or more than one object type is specified, the restore operation searches through the entire tape file, trying to find additional matching objects.
- Starting position.
The starting position in the tape file for each object is provided by save operations when output to an outfile is requested.
RSTOBJ OBJ(Z0002OFR) SAVLIB(TESTLIB) DEV(TAP02) SEQNBR(3199) POSITION(00000000000027FC0000000000004964)