Command line Search and Restore processing is useful for restoring archived data programmatically, when you are unsure of the Archive File that contains the archived data.
Although you can search Archive Files using the graphical user interface (and then restore the desired data), you cannot catalog or save a combined Search and Restore Process. You can, however, define Search and Restore Process parameters and save them in a parameter file, or in an override file.
In preparation for Search and Restore processing, you must prepare and save at least one typical, or “model” Restore Request. The model Restore Request must reference one or more Archive Files, and an Insert or Load Request that represents the data model (tables, relationships). The model Restore Request provides the Request Selection Mode, and the Insert or Load Request information for the Restore portion of the Search and Restore processing. The request can also provide global selection criteria.
Archive Files that match specific file filtering keywords and values are selected for Search and Restore processing. The filter parameters are provided as override keywords in a parameter file or override file.
You can also provide search criteria in the override file or parameter file. The search criteria are applied against data in Archive Files that match the filter criteria. Thus, Archive Files that match the filter criteria are selected for inclusion in the Search and Restore processing and, depending upon a Personal Options setting or an override, either files or indexes are for data that matches the search criteria. Search criteria syntax is identical to selection criteria syntax for a Restore Request.
After Archive Files that match the filter criteria are selected, the model Restore Request is used to process the files.
At runtime, selection criteria are used to determine the specific data to be restored. Global criteria specified in the parameter file or the override file take the place of any global selection criteria in the model Restore Request. Local selection criteria, if any, in the model Restore Request are ignored.
Search and Restore processing uses the Restore Selection mode and Insert or Load Request information from the model Restore Request. You can override Insert or Load parameters, with overrides applying to all processing. You cannot provide separate overrides for each Archive File as in the [AFn] overrides for a Restore Process.
You can run a Search and Restore Process from the command line by using a parameter file or an override file. For example, to use a parameter file, enter:
PR0CMND /R @C:\TEMP\OVERARC.TXT
The parameter file must contain all required keywords and values for the Search and Restore Process. In this example, C:\TEMP\OVERARC.TXT identifies the parameter file, which must include the TYPE=SearchAndRestore keyword and value, and the name of the model Restore Request. The value for the OV=* keyword indicates that Search and Restore overrides follow on subsequent lines.
To provide parameters on the command line and reference an override file, enter:
PR0CMND /R TYPE=SearchAndRestore REQUEST=L_DB250.CUST OV=C:\TEMP\SEARES.TXT
For this example, C:\TEMP\SEARES.TXT identifies the file containing the override keywords and values for the Search and Restore Process.