IBM Books

Administrative API Reference

sqlengne - Get Next Node Directory Entry

Returns the next entry in the node directory after sqlenops - Open Node Directory Scan is called. Subsequent calls to this API return additional entries.

Authorization

None

Required Connection

None

Version

sqlenv.h

C API Syntax



/* File: sqlenv.h */
/* API: Get Next Node Directory Entry */
/* ... */
SQL_API_RC SQL_API_FN
  sqlengne (
    unsigned short Handle,
    struct sqleninfo ** ppNodeDirEntry,
    struct sqlca * pSqlca);
/* ... */
 

Generic API Syntax



/* File: sqlenv.h */
/* API: Get Next Node Directory Entry */
/* ... */
SQL_API_RC SQL_API_FN
  sqlgngne (
    unsigned short Handle,
    struct sqleninfo ** ppNodeDirEntry,
    struct sqlca * pSqlca);
/* ... */
 

API Parameters

Handle
Input. Identifier returned from sqlenops - Open Node Directory Scan.

ppNodeDirEntry
Output. Address of a pointer to an sqleninfo structure. The caller of this API does not have to provide memory for the structure, just the pointer. Upon return from the API, the pointer points to the next node directory entry in the copy of the node directory allocated by sqlenops - Open Node Directory Scan. For more information about the sqleninfo structure, see SQLENINFO.

pSqlca
Output. A pointer to the sqlca structure. For more information about this structure, see SQLCA.

REXX API Syntax



GET NODE DIRECTORY ENTRY :scanid [USING :value] 

REXX API Parameters

scanid
A REXX host variable containing the identifier returned from the OPEN NODE DIRECTORY SCAN API.

value
A compound REXX host variable to which the node entry information is returned. If no name is given, the name SQLNINFO is used. In the following, XXX represents the host variable name (the corresponding field names are taken from the structure returned by the API):

XXX.0
Number of elements in the variable (always 16)

XXX.1
NODENAME

XXX.2
LOCALLU

XXX.3
PARTNERLU

XXX.4
MODE

XXX.5
COMMENT

XXX.6
RESERVED

XXX.7
PROTOCOL (protocol type)

XXX.8
ADAPTER (NetBIOS adapter #)

XXX.9
RESERVED

XXX.10
SYMDESTNAME (symbolic destination name)

XXX.11
SECURITY (security type)

XXX.12
HOSTNAME

XXX.13
SERVICENAME

XXX.14
FILESERVER

XXX.15
OBJECTNAME

XXX.16
INSTANCE (local instance name).

Sample Programs

C
\sqllib\samples\c\nodecat.c

COBOL
\sqllib\samples\cobol\nodecat.cbl

FORTRAN
\sqllib\samples\fortran\nodecat.f

REXX
\sqllib\samples\rexx\nodecat.cmd

Usage Notes

All fields in the node directory entry information buffer are padded to the right with blanks.

The sqlcode value of sqlca is set to 1014 if there are no more entries to scan when this API is called.

The entire directory can be scanned by calling this API pNumEntries times (pNumEntries is returned by sqlenops - Open Node Directory Scan).

See Also

sqlencls - Close Node Directory Scan

sqlenops - Open Node Directory Scan.


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

[ DB2 List of Books | Search the DB2 Books ]