Database and File APIs
The database and file APIs retrieve specific information about IBM® i files. These APIs also have the ability to get data and manipulate files.
With the exception of QDBLDBR, QDFRTVFD, QSQPRCED, QDBSTRS, QDBSTDS, QDBSTUS, QDBSTCRS, QDBSTLS, QDBSTLDS, and QDBSTLRS, the database and file APIs work with files that are either local or remote. Local files are files that are on the system where the program is running. Remote files are files on a target (remote) system that are accessed by using a distributed data management (DDM) file on a source (local) system. DDM files provide the information needed for a local system to locate a remote system and to access data in the remote system"s database files. The QDBLDBR, QDFRTVFD, QSQPRCED, QDBSTRS, QDBSTDS, QDBSTUS, QDBSTCRS, QDBSTLS, QDBSTLDS, and QDBSTLRS APIs work with local database files only.
When you call these APIs from a high-level language (HLL) program, you must specify whether to use file override processing on your local or remote files. The QDBLDBR, QSQPRCED, and QDMRTVFO APIs, however, do not support overrides.
Some of the database and file APIs return character values that have an associated coded character set identifier (CCSID). If the CCSID value for the job calling the API is not 65535, the character values are converted from their current CCSID to the CCSID of the job. This conversion may cause some data to be lost. The CCSID associated with the job is returned to the user. If the CCSID value for the job is 65535, no conversions are performed on the character values. The character value CCSID stored in the file object is returned to the user.
The database and file APIs use the standard user space format for the lists of information they return. If you are not familiar with this format, see User spaces before using these APIs.
The database and file APIs include:
A database exit program provides additional (user-written) functions for the database. The database and file exit programs are:
- CLI Connection (QIBM_QSQ_CLI_CONNECT) exit program is called by CLI through the registration facility before the connection is made to the relational database.
- Close Database File (QIBM_QDB_CLOSE) exit program is called when a process is trying to lock a file that is held by another process.
- Open Database File (QIBM_QDB_OPEN) exit program is called when a when a job is opening a database file.
- Query Governor Exit Program (QIBM_QQQ_QUERY_GOVR) allows the query governor to call an exit program when predicted query runtime or temporary storage usage exceed user specified limits.
- SQL Client Integration exit program enables SQL applications to access data managed by a database management system other than the IBM i relational database.
[ Back to top | APIs by category ]