Restore and Rescope Logical Files
When you restore a logical file, the system uses the description for the logical file to establish its relationship with the based-on files. For example, database views or indexes are logical files. You can restore a logical file to a library different than the library for the associated physical file. However, the associated physical file must remain in or be restored to its original library location. If you try to restore a logical file to a library in which it does not exist, the restore operation fails if any of the associated physical files have had their storage freed.
The system looks for the based-on files in the SAVLIB library, but not in the RSTLIB library.
If the correct physical files are not found in either library, the restore operation of the logical file fails.
The following considerations apply to restoring logical files:
- If the dependent physical or logical files are in the same library, the system provides the proper sequencing.
- If the files are in different libraries, you must restore the libraries in order, so that the physical or logical files that have logical files built on them are restored first, or you must specify a defer ID for the restore operation.
- If the depended-on physical or logical files are not restored before you attempt to restore the logical files, and if no defer ID is specified on the restore command, restoring the logical files fails.
- This sequencing also applies to other requirements between files, such as shared formats. You can restore those logical files that failed by using the RSTOBJ command.
- If the logical files and MQTs contain missing based-on files, you can set up a deferred restore by specifying the Defer ID (DFRID) parameter on the RSTOBJ or Restore Library (RSTLIB) command. When the based-on files become available, you can complete the deferred restore by using the Restore Deferred Objects (RSTDFROBJ) command.