IBM Books

Administrative API Reference

SQL-DIR-ENTRY

This structure is used by the DCS directory APIs.

Table 16. Fields in the SQL-DIR-ENTRY Structure
Field Name Data Type Description
STRUCT_ID SMALLINT Structure identifier. Set to SQL_DCS_STR_ID (defined in sqlenv).
RELEASE SMALLINT Release version (assigned by the API).
CODEPAGE SMALLINT Code page for comment.
COMMENT CHAR(30) Optional description of the database.
LDB CHAR(8) Local name of the database; must match database alias in system database directory.
TDB CHAR(18) Actual name of the database.
AR CHAR(32) Name of the application client.
PARM CHAR(512) Contains transaction program prefix, transaction program name, SQLCODE mapping file name, and disconnect and security option.
Note:The character fields passed in this structure must be null terminated or blank filled up to the length of the field.

Language Syntax

C Structure



/* File: sqlenv.h */
/* Structure: SQL-DIR-ENTRY */
/* ... */
SQL_STRUCTURE sql_dir_entry
{
  unsigned short         struct_id;
  unsigned short         release;
  unsigned short         codepage;
  _SQLOLDCHAR            comment[SQL_CMT_SZ + 1];
  _SQLOLDCHAR            ldb[SQL_DBNAME_SZ + 1];
  _SQLOLDCHAR            tdb[SQL_LONG_NAME_SZ + 1];
  _SQLOLDCHAR            ar[SQL_AR_SZ + 1];
  _SQLOLDCHAR            parm[SQL_PARAMETER_SZ + 1];
};
/* ... */
 

COBOL Structure



* File: sqlenv.cbl
01 SQL-DIR-ENTRY.
    05 STRUCT-ID              PIC 9(4) COMP-5.
    05 RELEASE-LVL            PIC 9(4) COMP-5.
    05 CODEPAGE               PIC 9(4) COMP-5.
    05 COMMENT                PIC X(30).
    05 FILLER                 PIC X.
    05 LDB                    PIC X(8).
    05 FILLER                 PIC X.
    05 TDB                    PIC X(18).
    05 FILLER                 PIC X.
    05 AR                     PIC X(32).
    05 FILLER                 PIC X.
    05 PARM                   PIC X(512).
    05 FILLER                 PIC X.
    05 FILLER                 PIC X(1).
*
 


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

[ DB2 List of Books | Search the DB2 Books ]