Session services
The session services APIs provide a general scrolling interface that can be
used to create, query, and manipulate sessions, and to perform input and
output operations to sessions.
Edit Function APIs
The edit function APIs are used to create and use edit masks. An edit mask is a
byte string that tells the edit machine instruction or the Edit (QECEDT) API how to
format a numeric value into a readable character string.
An edit mask can format a numeric value so that languages that cannot directly use
machine instructions can now take advantage of this function. The edit mask was
previously defined by the Edit Code (EDTCDE) and Edit Word (EDTWRD)
keywords in DDS.
An edit code is a standard description of how a number should be formatted.
There are many standard edit codes defined by the system. Users can define
several edit codes the way they want with the use of the Create Edit Description
(CRTEDTD) command.
An edit word is a user-defined description of how a number should be formatted.
An edit word is usually used when one of the standard edit codes or user-defined
edit codes is not sufficient for a particular situation.
The Convert Edit Code (QECCVTEC) API converts an edit code specification into
an edit mask, and the Convert Edit Word (QECCVTEW) API converts an edit word
specification into an edit mask. The resulting edit mask along with the value to be
formatted are then passed to the Edit (QECEDT) API, which transforms the
numeric from its internal format to a character form for displaying.
File APIs File APIs provide complete and specific information about a file on a local or
remote system. The file APIs include list, query, retrieve, and Structured Query
Language (SQL) APIs. The list APIs generate lists of the following:
Database file members
How files and members are related to a specified database file
Fields within a specified file record format name
Record formats contained within a specified file
The Query (QQQQRY) API is useful for querying requests whereby you want a
direct interface to OS/400 Query. The advantage of using the Query API is that
you are not limited by the function of any particular product interface. Also, you
can provide your own user interface and not be impeded by the extra code path
associated with an extra layer such as SQL. It is currently used only by more
expert programmers.
The Retrieve Display File (QDFRTVFD) API can be used to get complete and spe-
cific information about a display file. All the information that was in the data
description specifications (DDS) is returned in the output of the QDFRTVFD API.
By using the API, you can get specific field information for the display file.
Chapter 8. Use of OS/400 APIs 8-5