Sets the restore options and defines the data sets to restore.
#include <smstsapi.h> CCODE NWSMTSSetRestoreOptions( UINT32 connection, NWBOOLEAN checkCRC, NWBOOLEAN dontCheckSelectionList, NWSM_SELECTION_LIST *selectionList);
(IN) Specifies the connection information returned by NWSMTSConnectToTargetService or NWSMTSConnectToTargetServicEx.
(IN) Specifies the CRC verification flag:
(IN) Specifies if the internal selection list should be checked.
(IN) Points to the list of data sets to restore.
See Section 9.3, Target Service Return Values for more information.
The following table lists the return values associated with the function.
NWSMTSSetRestoreOptions clears the previous selection list, sets the TSA's internal restore selection list, and allows the engine to determine the mechanism used to find a data set to restore (see Set the Restore Options).
NWSMTSIsDataSetExcluded and NWSMTSWriteDataSet compare the names of the data sets to be restored against selectionList twice (once for each call). To prevent this double checking, set dontCheckSelectionList to TRUE. When the parameter is set to TRUE, only NWSMTSIsDataSetExcluded compares the data set name. This checking enhances data integrity, but decreases performance slightly. If no CRC was generated for the data set, no CRC check is performed.
If dontCheckSelectionList is set to FALSE, NWSMTSWriteDataSet will verify the data set's path information against the TSA's internal selection list. dontCheckSelectionList can be used with NWSMTSIsDataSetExcluded to speed up the restore process.
Each entry in selectionList contains the names or name patterns of the data sets to restore. If NULL is passed, all data sets are restored (see Using Resources with Selection Options and Documents). The "Data Set Name Functions" described in Storage Management Services Library can be used to help create this list.
Each time NWSMTSSetRestoreOptions is called, the previous selectionList will be replaced. NWSMTSSetRestoreOptions rebuilds the resource list which was built at the time of connection. The list is rebuilt because a resource may have been mounted or dismounted, or the resource’s name space information may have changed. To rebuild the resource list, the engine must set selectionList to NULL and call NWSMTSSetRestoreOptions or NWSMTSBuildResourceList.
NOTE:The bindery must be explicitly included in the restore session or it will not be restored.