NWSMTSSetArchiveStatus

Sets or restores the data set's archived status and other attributes.

Syntax

  #include <smstsapi.h> 
   
  CCODE NWSMTSSetArchiveStatus (
     UINT32   connection, 
     UINT32   dataSetHandle, 
     UINT32   setFlag, 
     UINT32   archivedDateAndTime);
  

Parameters

connection

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

dataSetHandle

(IN) Specifies the data set handle returned by NWSMTSOpenDataSetForBackup.

setFlag

(IN) Specifies the archive information to set.

archivedDateAndTime

(IN) Specifies the information to set as the data set's archived date and time.

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

0xFFFDFFAF

NWSMTS_CLUSTER_TARGET_DOES_NOT_EXIST

0xFFFDFFB9

NWSMTS_UNSUPPORTED_FUNCTION

0xFFFDFFBD

NWSMTS_SET_FILE_INFO_ERR

0xFFFDFFCE

NWSMTS_NO_SUCH_PROPERTY

0xFFFDFFE7

NWSMTS_INVALID_CONNECTION_HANDL

0xFFFEFFFF

NWSMDR_INVALID_CONNECTION

Remarks

Before NWSMTSSetArchiveStatus is called, the data set must be open.

NWSMTSSetArchiveStatus should be called before closing the data set.

Check if the resource supports archive attributes using NWSMTSGetUnsupportedOptions and NWSMTSGetTargetResourceInfoEx before invoking the API.

NOTE:Calling NWSMTSOpenDataSetForBackup or NWSMTSReadDataSet does not alter the access date and time.

setFlag can be set to zero or to one of the flags listed in the following table.

Value

Description

0x0000

NWSM_SET_MODIFY_FLAG: Sets the modify flag.

0x0001

NWSM_CLEAR_MODIFY_FLAG: Clears the modify flag. For TSAs, the data modified flag and characteristics modified flags are cleared.

0x0002

NWSM_SET_ARCHIVE_DATE_AND_TIME: Sets the data set's archive date and time.

0x0004

NWSM_SET_ARCHIVER_ID: Sets the archiver's ID into the data set.

archivedDateAndTime is a DOS packed date and time value (see "DOS Date and Time Functions" in Storage Management Services Utilities Library).