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 file space 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:
Name Description stBackup A backup object stArchive An archive object stBackupMountWait A backup object stArchiveMountWait An archive object For the dsmBindMC call,
stBackupandstBackupMountWaitare equivalent, andstArchiveandstArchiveMountWaitare equivalent. - mcBindKey *mcBindKeyP (O)
- This is the address of an
mcBindKeystructure 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 ( ).
| 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_NOBCG (184) | The management class for this file has no valid backup copy group. |
| DSM_RC_TL_EXCLUDED (185) | The backup object is excluded and cannot be sent. |
| DSM_RC_TL_NOACG (186) | The management class for this file has no valid archive copy group. |
| 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 IBM® Storage Protect library version. |