ILE C/C++ Programmer's Guide

Using the Binder to Create a Program

The binder is invoked through the Create Program (CRTPGM) or the Create Service Program (CRTSRVPGM) commands. The CRTPGM command creates a program object from one or more module object objects and, if required, binds to one or more service programs. The CRTSRVPGM command creates a service progam object from one or more module objects and, if required, binds to one or more service programs. See Chapter 3, Service Programs for more information about service programs.

The CRTPGM and CRTSRVPGM commands invoke an OS/400(R) component referred to as the binder. The binder processes import requests for procedure names and data item names from specified modules. The binder then tries to find matching exports in the specified modules, service programs, and binding directories. An export is an external symbol defined in a module or program that is available for use by other modules or programs. An import is the use of, or reference to, the name of a procedure or data item that is not defined in the current module object.

You can bind modules created by the compiler with modules created by any of the other ILE Create Module commands, including CRTRPGMOD, CRTCMOD, CRTCBLMOD, or CRTCLMOD, or other ILE compilers.

Note:
The modules or service programs to be bound must already have been created.


[ Top of Page | Previous Page | Next Page | Table of Contents ]