Stores a copy of the system database directory or the local database directory in memory, and returns the number of entries. This copy represents a snapshot of the directory at the time the directory is opened. This copy is not updated, even if the directory itself is changed later.
Use the db2DbDirGetNextEntry API to advance through the database directory, examining information about the database entries. Close the scan using the db2DbDirCloseScan API. This removes the copy of the directory from memory.
None
None
db2ApiDf.h
SQL_API_RC SQL_API_FN
db2DbDirOpenScan (
db2Uint32 versionNumber,
void * pParmStruct,
struct sqlca * pSqlca);
typedef SQL_STRUCTURE db2DbDirOpenScanStruct
{
char *piPath;
db2Uint16 oHandle;
db2Uint16 oNumEntries;
} db2DbDirOpenScanStruct;
SQL_API_RC SQL_API_FN
db2gDbDirOpenScan (
db2Uint32 versionNumber,
void * pParmStruct,
struct sqlca * pSqlca);
typedef SQL_STRUCTURE db2gDbDirOpenScanStruct
{
db2Uint32 iPath_len;
char *piPath;
db2Uint16 oHandle;
db2Uint16 oNumEntries;
} db2gDbDirOpenScanStruct;
Storage allocated by this API is freed by the db2DbDirCloseScan API.
Multiple db2DbDirOpenScan APIs can be issued against the same directory. However, the results may not be the same. The directory may change between openings.
There can be a maximum of eight opened database directory scans per process.