DB2 Version 10.1 for Linux, UNIX, and Windows

SQLB_TBSCONTQRY_DATA data structure

This structure is used to return container data to an application program.

Table 1. Fields in the SQLB-TBSCONTQRY-DATA Structure
Field Name Data Type Description
ID INTEGER Container identifier.
NTBS INTEGER Always 1.
TBSID INTEGER Table space identifier.
NAMELEN INTEGER Length of the container name (for languages other than C).
NAME CHAR(256) Container name.
UNDERDBDIR INTEGER Either 1 (container is under the DB directory) or 0 (container is not under the DB directory)
CONTTYPE INTEGER Container type.
TOTALPAGES INTEGER Total number of pages occupied by the table space container.
USEABLEPAGES INTEGER For DMS, TOTALPAGES minus overhead. For SMS, equal to TOTALPAGES.
OK INTEGER Either 1 (container is accessible) or 0 (container is inaccessible). Zero indicates an abnormal situation that usually requires the attention of the database administrator.
Possible values for CONTTYPE (defined in sqlutil) are:
SQLB_CONT_PATH
Specifies a directory path (SMS only).
SQLB_CONT_DISK
Specifies a raw device (DMS only).
SQLB_CONT_FILE
Specifies a file (DMS only).

API and data structure syntax

SQL_STRUCTURE SQLB_TBSCONTQRY_DATA
{
   sqluint32 id;
   sqluint32 nTbs;
   sqluint32 tbsID;
   sqluint32 nameLen;
   char name[SQLB_MAX_CONTAIN_NAME_SZ];
   sqluint32 underDBDir;
   sqluint32 contType;
   sqluint32 totalPages;
   sqluint32 useablePages;
   sqluint32 ok;
};

COBOL Structure

* File: sqlutbcq.cbl
01 SQLB-TBSCONTQRY-DATA.
    05 SQL-ID                 PIC 9(9) COMP-5.
    05 SQL-N-TBS              PIC 9(9) COMP-5.
    05 SQL-TBS-ID             PIC 9(9) COMP-5.
    05 SQL-NAME-LEN           PIC 9(9) COMP-5.
    05 SQL-NAME               PIC X(256).
    05 SQL-UNDER-DBDIR        PIC 9(9) COMP-5.
    05 SQL-CONT-TYPE          PIC 9(9) COMP-5.
    05 SQL-TOTAL-PAGES        PIC 9(9) COMP-5.
    05 SQL-USEABLE-PAGES      PIC 9(9) COMP-5.
    05 SQL-OK                 PIC 9(9) COMP-5.
*