The file APIs retrieve specific information about OS/400
files. These APIs also have the ability to get data
and manipulate files.
The file APIs include the following:
- Block EDRS Access
(QxdaBlockEDRS) provides functions to allow client jobs to
be temporarily suspended or switched to a backup server system
in a client/server environment.
Bring
Database Records (QDBBRCDS) asynchronously brings database physical file
records into main storage.
- Call Program
(QxdaCallProgramEDRS) is used to call a user-defined program
on the database server system.
Change Dynamic
Default Collection (QSQCHGDC) defines a default collection for unqualified table names
in dynamically prepared statements or in dynamically executed
statements.
- Check EDRS Block Status
(QxdaCheckEDRSBlock) returns information about the availability
status of a server system.
- Clear SQL Database Monitor Statistics
(QQQCSDBM) clears and frees the associated memory area of
the database monitor statistics.
- Commit EDRS Server
(QxdaCommitEDRS) is used to commit transactions on the
database server.
- Connect to EDRS Server
(QxdaConnectEDRS) is used to initiate a connection to a
server system.
- Create Database Hash
(QCreateDatabaseHash) sets up the environment to enable the
Run Database Hash (QDBRUNHA) API for a physical file that has a
uniquely keyed logical file built over it.
- Disconnect from EDRS Server
(QxdaDisconnectEDRS) is used to end a connection to a server
system.
- Dump SQL Database Monitor
(QQQDSDBM) dumps the SQL database monitor that has been
gathered.
- End SQL Database Monitor
(QQQESDBM) ends the memory-based SQL database monitor.
- Find EDRS Job
(QxdaFindEDRSJob) is used to find all jobs with user-defined
data associated with the Connect to EDRS Server (QxdaConnectEDRS)
API that matches the data passed to this API.
- List Database File Members
(QUSLMBR) generates a list of database file members and places the
list in a user space.
- List Database Relations
(QDBLDBR) provides information on how files and members are related
to a specified database file.
- List Fields
(QUSLFLD) generates a list of fields within a specified file record
format name.
- List Record Formats
(QUSLRCD) generates a list of record formats contained within a
specified file.
List Record
Locks (QDBRRCDL) lets you generate a list of jobs that are either waiting
for or holding a specific record lock.
- Process Command
(QxdaProcessCommand EDRS) is used to run a system command on
the database server system.
- Process Extended Dynamic SQL
(QSQPRCED) processes Structured Query Language (SQL)
extended dynamic statements in an SQL
package object.
- Process Immediate SQL Statement
(QxdaProcessImmediateEDRS) is used to run an SQL statement
on the database server.
- Process Remote Extended Dynamic SQL
(QxdaProcessExtDynEDRS) is used to perform extended dynamic
SQL operations on the database server system.
- Query
(QQQQRY) gets a set of database records that satisfy a database
query request.
- Query SQL Database Monitor
(QQQQSDBM) returns information about the activity of the
SQL and the original database monitor.
- Retrieve Database File Description
(QDBRTVFD) provides complete and specific information about a file
on a local or remote system.
- Retrieve Display File Description
(QDFRTVFD) allows you to get specific
information about the data description specifications (DDS)
definition used to create a
display file.
- Retrieve File Override Information
(QDMRTVFO) returns the name of the file, library, member,
and final type of override that result from processing
overrides for a specified file name.
Retrieve
Job Record Locks (QDBRJBRL) lets you generate a list of record
locks that a specific job is holding or for which it
is waiting.
- Retrieve Member Description
(QUSRMBRD) returns specific information about a single database
file member.
- Retrieve Short Name
(QDBRTVSN) allows you to get the 10-character name
of a database file by requesting the long file name of
the database file.
- Roll Back EDRS Server
(QxdaRollbackEDRS) is used to roll back transactions on
the database server.
- Run Database Hash (QDBRUNHA)
allows the user to FETCH, UPDATE,
DELETE, and INSERT data into existing database files using an
alternative access method.
- Start SQL Database Monitor
(QQQSSDBM) starts the memory-based SQL database monitor.
- Syntax Check SQL Statement
(QSQCHKS) calls the DB2 for AS/400 SQL parser to check the syntax
of an SQL statement.
With the exception of QDBLDBR, QDFRTVFD, and QSQPRCED,
these APIs work with
files that are either local or remote. Local files are files that are
on the AS/400 system where the program is running. Remote files are
files on a target (remote) system that are accessed 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,
and QSQPRCED
APIs work with local database files only.
When you are calling these APIs from your high-level language (HLL)
program, you must specify whether or not to use file override
processing on your local or remote files.
However, the QDBLDBR, QSQPRCED, and QDMRTVFO
APIs do not support overrides.
Some of the file APIs return character values that have an
associated CCSID (coded character set identifier).
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 file APIs use the standard user space format for the
lists of information they return.
If you are not yet familiar with this format,
see User Space Format for List APIs
before using these APIs.
For information about the SQL call level interface API,
see
SQL Call Level Interface.
A database exit program provides additional (user-written)
functions for the database.
The CLI Connection
exit program is called by CLI through the registration facility before the connection is made
to the relational database.
The SQL Client Integration exit program
enables SQL applications to access data managed by a
database management system other than the OS/400 relational
database.