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 sqledgne - Get Next Database Directory Entry to advance through the database directory, examining information about the database entries. Close the scan using sqledcls - Close Database Directory Scan. This removes the copy of the directory from memory.
Authorization
None
Required Connection
None
Version
sqlenv.h
C API Syntax
/* File: sqlenv.h */ /* API: Open Database Directory Scan */ /* ... */ SQL_API_RC SQL_API_FN sqledosd ( _SQLOLDCHAR * pPath, unsigned short * pHandle, unsigned short * pNumEntries, struct sqlca * pSqlca); /* ... */ |
Generic API Syntax
/* File: sqlenv.h */ /* API: Open Database Directory Scan */ /* ... */ SQL_API_RC SQL_API_FN sqlgdosd ( unsigned short PathLen, struct sqlca * pSqlca, unsigned short * pNumEntries, unsigned short * pHandle, _SQLOLDCHAR * pPath); /* ... */ |
API Parameters
REXX API Syntax
OPEN DATABASE DIRECTORY [ON path_name] USING :value |
REXX API Parameters
Sample Programs
Usage Notes
Storage allocated by this API is freed by sqledcls - Close Database Directory Scan.
Multiple OPEN DATABASE DIRECTORY SCAN 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.
See Also
sqledcls - Close Database Directory Scan
sqledgne - Get Next Database Directory Entry.