sqlbftpq API - Fetch the query data for rows in a table space

Fetches a specified number of rows of table space query data, each row consisting of data for a table space.

Important: This command or API has been deprecated in Version 9.7 and might be removed in a future release. You can use the MON_GET_TABLESPACE and the MON_GET_CONTAINER table functions instead which return more information. For more information, see LIST TABLESPACES and LIST TABLESPACE CONTAINERS commands have been deprecated.

Scope

In a partitioned database environment, only the table spaces on the current database partition are listed.

Authorization

One of the following authorities:
  • SYSADM
  • SYSCTRL
  • sysmaint
  • SYSMON
  • DBADM
  • LOAD

Required connection

Database

API include file

sqlutil.h

API and data structure syntax

SQL_API_RC SQL_API_FN
  sqlbftpq (
   struct sqlca * pSqlca,
   sqluint32 MaxTablespaces,
   struct SQLB_TBSPQRY_DATA * pTablespaceData,
   sqluint32 * pNumTablespaces);

SQL_API_RC SQL_API_FN
  sqlgftpq (
   struct sqlca * pSqlca,
   sqluint32 MaxTablespaces,
   struct SQLB_TBSPQRY_DATA * pTablespaceData,
   sqluint32 * pNumTablespaces);

sqlbftpq API parameters

pSqlca
Output. A pointer to the sqlca structure.
MaxTablespaces
Input. The maximum number of rows of data that the user allocated output area (pointed to by pTablespaceData) can hold.
pTablespaceData
Input and output. Pointer to the output area, a structure for query data. For more information about this structure, see SQLB-TBSPQRY-DATA. The caller of this API must:
  • Allocate space for MaxTablespaces of these structures
  • Initialize the structures
  • Set TBSPQVER in the first structure to SQLB_TBSPQRY_DATA_ID
  • Set pTablespaceData to point to this space. The API will use this space to return the table space data.
pNumTablespaces
Output. Number of rows of output returned.

Usage notes

The user is responsible for allocating and freeing the memory pointed to by the pTablespaceData parameter. This API can only be used after a successful sqlbotsq call. It can be invoked repeatedly to fetch the list generated by sqlbotsq.