IBM Version 4 Universal Remote User Manual


 
Chapter 4. Common Information across APIs—Advanced
(ILE) Example
Through the use of several examples, this chapter provides information about how
to use more advanced or more complex API concepts in your programs. The
example programs in this chapter use ILE APIs. These examples are also shown
in additional languages in “Integrated Language Environment (ILE)
APIs—Examples” on page B-47.
In the examples, the following are focus items:
Header files
Keyed interfaces
Error handling
Receiver variables
For more information about the APIs used in this chapter, refer to the
System API
Reference
, SC41-5801.
Integrated Language Environment (ILE) APIs—Introduction
OS/400 Integrated Language Environment (ILE) APIs are contained within service
programs that the calling program binds to. In addition, some OS/400 ILE APIs
provide a program interface for the original program model (OPM) languages. You
can usually distinguish between the *SRVPGM interface and the *PGM interface by
the name of the API. For example, the registration facility APIs provide both a
program and a service program entry point (procedure) interface. For the Register
Exit Point API, the service program entry point interface is named
QusRegisterExitPoint and the program interface is named QUSRGPT. A bindable
procedure name can be up to 30 characters and mixed uppercase and lowercase.
A program interface name can be up to 8 characters and is all uppercase.
A binding directory is used for OS/400 ILE APIs that are contained in service pro-
grams. A binding directory is a list of names of modules and service programs
that provides a reference by name and type. Service programs that contain
OS/400 ILE APIs are in the QUSAPIBD binding directory. This binding directory is
implicitly used by ILE compilers to resolve the OS/400 ILE API references; there-
fore, it is not necessary to explicitly name the service program or the API binding
directory when creating programs that use OS/400 ILE APIs. If you provide your
own APIs with the same name, make sure that you also provide your own binding
directory or service program.
All OS/400 APIs (ILE and non-ILE) have a header file supplied by OS/400. These
header files reside in the optionally installable library QSYSINC. The header files
provide the prototypes for the API as well as define any structures that are used by
the API. The QSYSINC library is used by the ILE C compiler to search for header
files; therefore, it is not necessary to specify a library qualifier for any header files
that reside in the QSYSINC library. When coding in ILE C, remember to enclose
the header file name in less-than (<) and greater-than (>) symbols because this
affects how the library list is processed in locating the header file.
Copyright IBM Corp. 1997 4-1