Administrative API Reference
Returns the next entry in the system database directory or the local
database directory copy returned by sqledosd - Open Database Directory Scan. 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 Database Directory Entry */
/* ... */
SQL_API_RC SQL_API_FN
sqledgne (
unsigned short Handle,
struct sqledinfo ** ppDbDirEntry,
struct sqlca * pSqlca);
/* ... */
|
Generic API Syntax
/* File: sqlenv.h */
/* API: Get Next Database Directory Entry */
/* ... */
SQL_API_RC SQL_API_FN
sqlgdgne (
unsigned short Handle,
struct sqledinfo ** ppDbDirEntry,
struct sqlca * pSqlca);
/* ... */
|
API Parameters
- Handle
- Input. Identifier returned from the associated OPEN DATABASE
DIRECTORY SCAN API.
- ppDbDirEntry
- Output. The caller supplies the API with the address of a pointer
to an sqledinfo structure. The space for the directory data
is allocated by the API, and a pointer to that space is returned to the
caller. A call to sqledcls - Close Database Directory Scan frees the allocated space. Information returned
to the buffer is described in SQLEDINFO.
- pSqlca
- Output. A pointer to the sqlca structure. For
more information about this structure, see SQLCA.
REXX API Syntax
GET DATABASE DIRECTORY ENTRY :scanid [USING :value]
|
REXX API Parameters
- scanid
- A REXX host variable containing the identifier returned from the OPEN
DATABASE DIRECTORY SCAN API.
- value
- A compound REXX host variable to which the database entry information is
returned. If no name is given, the name SQLDINFO 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 12)
- XXX.1
- ALIAS (alias of the database)
- XXX.2
- DBNAME (name of the database)
- XXX.3
- DRIVE/PATH (local database directory path name)
- XXX.3.1
- NODE NUMBER (valid for local database directory only)
- XXX.4
- INTNAME (token identifying the database subdirectory)
- XXX.5
- NODENAME (name of the node where the database is located)
- XXX.6
- DBTYPE (product name and release number)
- XXX.7
- COMMENT (comment associated with the database)
- XXX.8
- Reserved
- XXX.9
- TYPE (entry type)
- XXX.10
- AUTHENTICATION (authentication type)
- XXX.10.1
- DCE principal
- XXX.11
- GLBDBNAME (Global database name)
- XXX.12
- CATALOG NODE NUMBER
Sample Programs
- C
- \sqllib\samples\c\dbcat.c
- COBOL
- \sqllib\samples\cobol\dbcat.cbl
- FORTRAN
- \sqllib\samples\fortran\dbcat.f
- REXX
- \sqllib\samples\rexx\dbcat.cmd
Usage Notes
All fields of the directory entry information buffer are padded to the
right with blanks.
A subsequent GET NEXT DATABASE DIRECTORY ENTRY obtains the entry following
the current entry.
The sqlcode value of sqlca is set to 1014 if there
are no more entries to scan when GET NEXT DATABASE DIRECTORY ENTRY is
called.
The count value returned by the OPEN DATABASE DIRECTORY SCAN API can be
used to scan through the entire directory by issuing GET NEXT DATABASE
DIRECTORY ENTRY calls, one at a time, until the number of scans equals the
count of entries.
See Also
sqledcls - Close Database Directory Scan
sqledosd - Open Database Directory Scan.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
[ DB2 List of Books |
Search the DB2 Books ]