Administrative API Reference

SQLEDINFO

This structure is used to return information after a call to sqledgne - Get Next Database Directory Entry. It is shared by both the system database directory and the local database directory.

Table 50. Fields in the SQLEDINFO Structure
Field Name Data Type Description
ALIAS CHAR(8) An alternate database name.
DBNAME CHAR(8) The name of the database.
DRIVE CHAR(215) The local database directory path name where the database resides. This field is returned only if the system database directory is opened for scan.
Note:On OS/2, this field is CHAR(2); on Windows NT, it is CHAR(12).
INTNAME CHAR(8) A token identifying the database subdirectory. This field is returned only if the local database directory is opened for scan.
NODENAME CHAR(8) The name of the node where the database is located. This field is returned only if the cataloged database is a remote database.
DBTYPE CHAR(20) Database manager release information.
COMMENT CHAR(30) The comment associated with the database.
COM_CODEPAGE SMALLINT The code page of the comment. Not used.
TYPE CHAR(1) Entry type. See below for values.
AUTHENTICATION SMALLINT Authentication type. See below for values.
GLBDBNAME CHAR(255) The global name of the target database in the global (DCE) directory, if the entry is of type SQL_DCE.
DCEPRINCIPAL CHAR(1024) The principal name if the authentication is of type DCE or KERBEROS.
CAT_NODENUM SHORT Catalog node number.
NODENUM SHORT Node number.
Note:Both system and local database directory use the same structure, but only certain fields are valid for each. Each character field returned is blank filled up to the length of the field.

Valid values for TYPE (defined in sqlenv) are:

SQL_INDIRECT
Database created by the current instance (as defined by the value of the DB2INSTANCE environment variable).

SQL_REMOTE
Database resides at a different instance.

SQL_HOME
Database resides on this volume (always HOME in local database directory).

SQL_DCE
Database resides in DCE directories.

Valid values for AUTHENTICATION (defined in sqlenv) are:

SQL_AUTHENTICATION_SERVER
Authentication of the user name and password takes place at the server.

SQL_AUTHENTICATION_CLIENT
Authentication of the user name and password takes place at the client.

SQL_AUTHENTICATION_DCS
Used for DB2 Connect.

SQL_AUTHENTICATION_DCE
Authentication takes place using DCE Security Services.

SQL_AUTHENTICATION_KERBEROS
Authentication takes place using Kerberos Security Mechanism.

SQL_AUTHENTICATION_NOT_SPECIFIED
DB2 no longer requires authentication to be kept in the database directory. Specify this value when connecting to anything other than a down-level (DB2 V2 or less) server.

Language Syntax

C Structure



/* File: sqlenv.h */
/* Structure: SQLEDINFO */
/* ... */
SQL_STRUCTURE sqledinfo
{
  _SQLOLDCHAR    alias[SQL_ALIAS_SZ];
  _SQLOLDCHAR    dbname[SQL_DBNAME_SZ];
  _SQLOLDCHAR    drive[SQL_DRIVE_SZ];
  _SQLOLDCHAR    intname[SQL_INAME_SZ];
  _SQLOLDCHAR    nodename[SQL_NNAME_SZ];
  _SQLOLDCHAR    dbtype[SQL_DBTYP_SZ];
  _SQLOLDCHAR    comment[SQL_CMT_SZ];
  short          com_codepage;
  _SQLOLDCHAR    type;
  unsigned short authentication;
  char           glbdbname[SQL_DIR_NAME_SZ];
  _SQLOLDCHAR    dceprincipal[SQL_DCEPRIN_SZ];
  short          cat_nodenum;
  short          nodenum;
};
/* ... */
 

COBOL Structure



* File: sqlenv.cbl
01 SQLEDINFO.
    05 SQL-ALIAS              PIC X(8).
    05 SQL-DBNAME             PIC X(8).
    05 SQL-DRIVE              PIC X(215).
    05 SQL-INTNAME            PIC X(8).
    05 SQL-NODENAME           PIC X(8).
    05 SQL-DBTYPE             PIC X(20).
    05 SQL-COMMENT            PIC X(30).
    05 FILLER                 PIC X(1).
    05 SQL-COM-CODEPAGE       PIC S9(4) COMP-5.
    05 SQL-TYPE               PIC X.
    05 FILLER                 PIC X(1).
    05 SQL-AUTHENTICATION     PIC 9(4) COMP-5.
    05 SQL-GLBDBNAME          PIC X(255).
    05 SQL-DCEPRINCIPAL       PIC X(1024).
    05 FILLER                 PIC X(1).
    05 SQL-CAT-NODENUM        PIC S9(4) COMP-5.
    05 SQL-NODENUM            PIC S9(4) COMP-5.
*
 


[ Top of Page | Previous Page | Next Page ]