Tivoli Header
Tivoli Storage Manager Using the Application Program Interface
The API has several queries, such as management class query, that
applications can use. All queries that use dsmBeginQuery
follow the same steps that are described below:
- Send the dsmBeginQuery call with the appropriate query
type:
- Backup
- Archive
- Active backed-up objects
- File space
- Management class.
The dsmBeginQuery call informs the API in what format the data
is returning from the server. The appropriate fields can be placed in
the data structures that are passed by the dsmGetNextQObj
calls. The begin query call also permits the application client to set
the scope of the query by properly specifying the parameters on the begin
query call.
- Note:
- On the UNIX platform, only the root user can query active backed-up objects
(also known as fast path).
-
Enter the dsmGetNextQObj call to obtain each record from the
query. This call passes a buffer that is large enough to hold the data
that is returned from the query. Each query type has a corresponding
data structure for the data returned. For example, a backup query type
has an associated qryRespBackupData structure that is filled in
when the dsmGetNextQObj call is sent.
- Check the return code. The dsmGetNextQObj call usually
returns one of the following codes. You also might receive an error
code:
- DSM_RC_MORE_DATA. Send the dsmGetNextQObj call
again.
- DSM_RC_FINISHED. There is no more data. Send the
dsmEndQuery call.
-
Send the dsmEndQuery call. When all query data is retrieved
or additional query data is not needed, enter the dsmEndQuery call
to end the query process. This causes the API to flush any remaining
data from the query stream and release any resources that were used for the
query.
Figure 9 displays the state diagram for performing query
operations.
Figure 9. State Diagram for General Queries

Figure 10 displays the flowchart for performing query
operations.
Figure 10. Flowchart for General Queries

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