sqleninfo data structure

This structure returns information after a call to the sqlengne API.

Table 1. Fields in the SQLENINFO Structure
Field Name Data Type Description
NODENAME CHAR(8) The name of the node where the database is located (valid in system directory only)
LOCAL_LU CHAR(8) Local logical unit.
PARTNER_LU CHAR(8) Partner logical unit.
MODE CHAR(8) Transmission service mode.
COMMENT CHAR(30) The comment associated with the node.
COM_CODEPAGE SMALLINT The code page of the comment. This field is no longer used by the database manager.
ADAPTER SMALLINT The local network adapter.
NETWORKID CHAR(8) Network ID.
PROTOCOL CHAR(1) Communications protocol.
SYM_DEST_NAME CHAR(8) Symbolic destination name.
SECURITY_TYPE SMALLINT Security type.
HOSTNAME CHAR(255) Used for the TCP/IP protocol; the name of the TCP/IP host or IPv4 or IPv6 address on which the Db2® server instance resides.
SERVICE_NAME CHAR(14) Used for the TCP/IP protocol; the TCP/IP service name or associated port number of the Db2 server instance.
FILESERVER CHAR(48) Used for the IPX/SPX protocol; the name of the NetWare file server where the Db2 server instance is registered.
OBJECTNAME CHAR(48) The database manager server instance is represented as the object, objectname, on the NetWare file server. The server's IPX/SPX internetwork address is stored and retrieved from this object.
INSTANCE_NAME CHAR(8) Used for the local and NPIPE protocols; the name of the server instance.
COMPUTERNAME CHAR(15) Used by the NPIPE protocol; the server node's computer name.
SYSTEM_NAME CHAR(21) The Db2 system name of the remote server.
REMOTE_INSTNAME CHAR(8) The name of the Db2 server instance.
CATALOG_NODE_TYPE CHAR Catalog node type.
OS_TYPE UNSIGNED SHORT Identifies the operating system of the server.
Note: Each character field returned is blank filled up to the length of the field.
Valid values for SECURITY_TYPE (defined in sqlenv) are:
  • SQL_CPIC_SECURITY_NONE
  • SQL_CPIC_SECURITY_SAME
  • SQL_CPIC_SECURITY_PROGRAM

API and data structure syntax

SQL_STRUCTURE sqleninfo
{
        _SQLOLDCHAR nodename[SQL_NNAME_SZ];
        _SQLOLDCHAR local_lu[SQL_LOCLU_SZ];
        _SQLOLDCHAR partner_lu[SQL_RMTLU_SZ];
        _SQLOLDCHAR mode[SQL_MODE_SZ];
        _SQLOLDCHAR comment[SQL_CMT_SZ];
        unsigned short com_codepage;
        unsigned short adapter;
        _SQLOLDCHAR networkid[SQL_NETID_SZ];
        _SQLOLDCHAR protocol;
        _SQLOLDCHAR sym_dest_name[SQL_SYM_DEST_NAME_SZ];
        unsigned short security_type;
        _SQLOLDCHAR hostname[SQL_HOSTNAME_SZ];
        _SQLOLDCHAR service_name[SQL_SERVICE_NAME_SZ];
        char fileserver[SQL_FILESERVER_SZ];
        char objectname[SQL_OBJECTNAME_SZ];
        char instance_name[SQL_INSTNAME_SZ];
        char computername[SQL_COMPUTERNAME_SZ];
        char system_name[SQL_SYSTEM_NAME_SZ];
        char remote_instname[SQL_REMOTE_INSTNAME_SZ];
        _SQLOLDCHAR catalog_node_type;
        unsigned short os_type;
        _SQLOLDCHAR chgpwd_lu[SQL_RMTLU_SZ];
        _SQLOLDCHAR transpn[SQL_TPNAME_SZ];
        _SQLOLDCHAR lanaddr[SQL_LANADDRESS_SZ];
};

COBOL Structure

* File: sqlenv.cbl
01 SQLENINFO.
    05 SQL-NODE-NAME          PIC X(8).
    05 SQL-LOCAL-LU           PIC X(8).
    05 SQL-PARTNER-LU         PIC X(8).
    05 SQL-MODE               PIC X(8).
    05 SQL-COMMENT            PIC X(30).
    05 SQL-COM-CODEPAGE       PIC 9(4) COMP-5.
    05 SQL-ADAPTER            PIC 9(4) COMP-5.
    05 SQL-NETWORKID          PIC X(8).
    05 SQL-PROTOCOL           PIC X.
    05 SQL-SYM-DEST-NAME      PIC X(8).
    05 FILLER                 PIC X(1).
    05 SQL-SECURITY-TYPE      PIC 9(4) COMP-5.
    05 SQL-HOSTNAME           PIC X(255).
    05 SQL-SERVICE-NAME       PIC X(14).
    05 SQL-FILESERVER         PIC X(48).
    05 SQL-OBJECTNAME         PIC X(48).
    05 SQL-INSTANCE-NAME      PIC X(8).
    05 SQL-COMPUTERNAME       PIC X(15).
    05 SQL-SYSTEM-NAME        PIC X(21).
    05 SQL-REMOTE-INSTNAME    PIC X(8).
    05 SQL-CATALOG-NODE-TYPE  PIC X.
    05 SQL-OS-TYPE            PIC 9(4) COMP-5.
*