Tivoli Header

Tivoli Storage Manager Using the Application Program Interface

dsmBindMC

The dsmBindMC function call associates, or binds, a management class to the passed object. The object is passed through the Include-Exclude list that is pointed to in the options file. If a match is not found in the Include list for a specific management class, the default management class is assigned. The Exclude list can prevent objects from a backup but not from an archive.

The application client can use the parameters that are returned in the mcBindKey structure to determine if this object should be backed up or archived, or whether a new transaction must be started because of different copy destinations. See dsmBeginTxn for more information.

Call dsmBindMC before you call dsmSendObj because every object must have a management class associated with it. This call can be performed within a transaction or outside of a transaction. For example, within a multiple object transaction, if dsmBindMC indicates that the object has a different copy destination than the previous object, the transaction must be ended and a new transaction started. In this case, another dsmBindMC is not required because one has already been performed for this object.

Syntax

dsInt16_t dsmBindMC  (dsUint32_t       dsmHandle,
   dsmObjName  *objNameP,
   dsmSendType  sendType,
   mcBindKey   *mcBindKeyP);

Parameters

dsUint32_t dsmHandle (I)
The handle that associates this call with a previous dsmInitEx call.

dsmObjName *objNameP (I)
A pointer to the structure that contains the filespace name, high-level object name, low-level object name, and object type.

dsmSendType sendType (I)
Identifies whether this management class bind is performed for archive or backup sends. The possible values for this call include:
stBackup A backup object
stArchive An archive object
stBackupMountWait A backup object
stArchiveMountWait An archive object

For the dsmBindMC call, stBackup and stBackupMountWait are equivalent, and stArchive and stArchiveMountWait are equivalent.

mcBindKey *mcBindKeyP (O)
This is the address of an mcBindKey structure where the management class information is returned. The application client can use the information that is returned here to determine if this object fits within a multiple object transaction, or to perform a management class query on the management class that is bound to the object.

Return Codes

The return code numbers are provided in parentheses ( ).

Table 19. Return Codes for dsmBindMC

Return Code Explanation
DSM_RC_NO_MEMORY (102) There is no RAM remaining to complete the request.
DSM_RC_INVALID_PARM (109) One of the parameters that was passed has an invalid value.
DSM_RC_TL_EXCLUDED (185) The backup object is excluded and cannot be sent.
DSM_RC_INVALID_OBJTYPE (2010) Invalid object type.
DSM_RC_INVALID_SENDTYPE (2022) Invalid send type.
DSM_RC_WRONG_VERSION_PARM (2065) Application client API version is different from the TSM library version.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]