──┬─ RESTORE ────────┬─┬───────────────────────────────────────┬───────► ├─ RESTOREADD ─────┤ │ ┌◄──────────────────────────────────┐ │ └─ RESTOREREPLACE ─┘ └─┴─┬─ & ───┬─┬─/1\─┬─ COMPARE ─────┬─┴─┘ └─ AND ─┘ │ └─ VERIFY ──────┤ ├─/1\─ REPORT ────────┤ ├─/1\─ SELECT ────────┤ └─/1\─┬─ DSONERROR ───┤ └─ WAITONERROR ─┘ ┌◄──────────── , ───────────┐ ►─┴─┬─<file selection>──────┬─┴────────────────────────────────────────► └─<directory selection>─┘ ►─ FROM ──<source volume name>─┬──────────────────────────────────────┬─┤ └─ ( ──<source volume attributes>── ) ─┘
──┬─<file name>── ORIGIN ──<family name>─┬─────────────────────────────► └─<tape file number>───────────────────┘ ►─┬───────────────────┬────────────────────────────────────────────────┤ └─ AS ──<file name>─┘
<tape file number>
── # ──<integer constant>──────────────────────────────────────────────┤
──<directory name>── ORIGIN ──<family name>────────────────────────────► ►─┬────────────────────────┬───────────────────────────────────────────┤ └─ AS ──<directory name>─┘
──┬─ # ──<string primary>──────────────────┬───────────────────────────┤ ├─<letter>─┬─┬───────────────────────────┤ └─<digit>──┘ │ ┌◄──────────────────────┐ │ └─┴─/16\─┬─<letter>─────┬─┴─┘ ├─<digit>──────┤ ├─<hyphen>─────┤ └─<underscore>─┘
┌◄───────────────────────── , ─────────────────────────┐ ──┴─┬─ /1\ ─┬─────────────┬─┬─ TAPE ───────────────────┬─┴─────────────┤ │ └─ KIND ── = ─┘ └─ CD ─────────────────────┤ ├─ /1\ ── SERIALNO ── = ──<serial number list>─────┤ ├─ /1\ ── FAMILYOWNER ── = ─┬─ "" ─────────────────┤ │ ├─ * ──────────────────┤ │ └─<usercode>───────────┤ ├─ /1\ ── AUTOUNLOAD ── = ─┬─ ON ──────────────────┤ │ ├─ OFF ─────────────────┤ │ └─ DONTCARE ────────────┤ ├─ /1\ ── CYCLE ── = ──<integer expression>────────┤ ├─ /1\ ── LIBMAINTDIR ─┬───────────────────────────┤ │ └─ = ──<Boolean expression>─┤ ├─ /1\ ── UNITNO ── = ──<integer expression>───────┤ └─ /1\ ── VERSION ── = ──<integer expression>──────┘
Explanation
The RESTORE statement is used to copy files from a library maintenance tape or CD‑ROM volume to the disk families from which they were originally copied.
Note: | WFL includes another statement called ARCHIVE RESTORE, rather than simply RESTORE. The two statements serve different purposes. The ARCHIVE RESTORE statement reloads files that have archive backup directory entries. The RESTORE statement reloads files from any library maintenance tape or CD-ROM volume, regardless of whether or not the files have archive backup directory entries. |
The family name you specify after the key word ORIGIN for a given file or directory name indicates the name of the disk family from which that file was copied when library maintenance created the input tape or CD-ROM. The input tape or CD-ROM may contain files which were copied from several different disk families. The family names listed in the library maintenance tape or CD-ROM directories are the actual disk family names from which those files were copied. In the case of a library maintenance copy from disk to tape or CD-ROM that is run under a family substitution statement, the disk family names stored in the tape or CD-ROM directory are those used after applying the family substitution.
The RESTORE statement enables you to copy files from tape or CD-ROM to disk when the tape or CD-ROM contains files copied from several different disk families. You should use the RESTORE statement if you want to copy all of the specified files and directories.
The RESTORE statement invokes the *LIBRARY/MAINTENANCE process. If an error occurs in the restore process, library maintenance sets the TASKVALUE task variable to a non-zero value; if no errors occur, library maintenance sets the TASKVALUE task variable to zero.
The RESTOREADD variation enables you to copy specified files that do not have existing copies on the disk. The RESTOREREPLACE variation enables you to copy and replace specified files that do already have existing copies on the disk.
If a restore request specifies a file name or directory name that selects one of the files that does not have an original disk family name listed in the tape or CD-ROM directory, you will receive the following error message:
MT <unit number> NO ORIGINAL FAMILY NAME FOR <file name>, FILE WILL NOT BE RESTORED.
The restore process does not copy the named file, but does continue to restore other files. Family substitution can be used in the job which contains the RESTORE statement to re‑direct the copy for one origin family to a different family. The tape or CD-ROM name you specify indicates the tape or CD-ROM or set of tapes or CD-ROMs that contain the files you want to copy back to disk. You can only specify the name of one input in a RESTORE statement.
You can use the HI (Cause Exception Event) system command to check the progress of a RESTORE statement. A command of the form <mix number> HI displays the number of files already copied and other information.
The <tape file number> option specifies the position number of the file on the source tape or source CD-ROM. The position number of the first file on a tape is 1, and so forth. The <tape file number> must be a positive integer that is greater than zero (0) and has less than 12 digits (counting leading zeros). You cannot use <tape file number> in file transfer copy statements (copy statements with <transfer service> or HOSTNAME clauses). You cannot specify ORIGIN <family name> for a <tape file number>.
When the tape name includes a <string primary>, embedded periods will terminate the tape name unless the entire name is enclosed in quotes.