IBM Books

Administrative API Reference

SQLB-TBSCONTQRY-DATA

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

Table 20. 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).

Language Syntax

C Structure



/* File: sqlutil.h */
/* Structure: SQLB-TBSCONTQRY-DATA */
/* ... */
SQL_STRUCTURE SQLB_TBSCONTQRY_DATA
{
  unsigned long   id;
  unsigned long   nTbs;
  unsigned long   tbsID;
  unsigned long   nameLen;
  char            name[SQLB_MAX_CONTAIN_NAME_SZ];
  unsigned long   underDBDir;
  unsigned long   contType;
  unsigned long   totalPages;
  unsigned long   useablePages;
  unsigned long   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.
*
 


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

[ DB2 List of Books | Search the DB2 Books ]