NWSMTSSetRestoreOptions

Sets the restore options and defines the data sets to restore.

Syntax

  #include <smstsapi.h> 
   
  CCODE NWSMTSSetRestoreOptions(
     UINT32                   connection, 
     NWBOOLEAN                checkCRC, 
     NWBOOLEAN                dontCheckSelectionList, 
     NWSM_SELECTION_LIST  *selectionList);
  

Parameters

connection

(IN) Specifies the connection information returned by NWSMTSConnectToTargetService or NWSMTSConnectToTargetServicEx.

checkCRC

(IN) Specifies the CRC verification flag:

  • TRUE Check the data set's CRC
  • FALSE Do not check the CRC
dontCheckSelectionList

(IN) Specifies if the internal selection list should be checked.

selectionList

(IN) Points to the list of data sets to restore.

Return Values

See Section 9.3, Target Service Return Values for more information.

The following table lists the return values associated with the function.

0x00000000

Successful

0xFFFBFFFB

NWSMUT_OUT_OF_MEMORY

0xFFFBFFFD

NWSMUT_INVALID_PARAMETER

0xFFFBFFFF

NWSMUT_INVALID_HANDLE

0xFFFDFFB9

NWSMTS_UNSUPPORTED_FUNCTION

0xFFFDFFC9

NWSMTS_OUT_OF_MEMORY

0xFFFDFFDA

NWSMTS_INVALID_SEL_LIST_ENTRY

0xFFFDFFE7

NWSMTS_INVALID_CONNECTION_HANDL

0xFFFEFFFF

NWSMDR_INVALID_CONNECTION

Remarks

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.

See Also

NWSMTSIsDataSetExcluded, NWSMTSOpenDataSetForRestore, NWSMTSWriteDataSet