Application program objects
Several objects are created when a Db2® for i application program is being precompiled.
Db2 for i supports both non-ILE and ILE precompilers. Application programs can be either distributed or nondistributed.
With the Db2 for i database, you might need to manage the following objects:
- The original source
- Optionally, the module object for ILE programs
- The program or service program
- The SQL package for distributed programs
With a nondistributed non-ILE Db2 for i program, you must manage only the original source and the resulting program. The following figure shows the objects involved and the steps that happen during the precompile and compile processes for a nondistributed non-ILE Db2 for i program. The user source file precompiles the source to a temporary source file member. This member is then compiled into a program.

With a nondistributed ILE Db2 for i program, you might need to manage the original source, the modules, and the resulting program or service program. The following figure shows the objects involved and the steps that happen during the precompile and compile processes for a nondistributed ILE Db2 for i program when OBJTYPE(*PGM) is specified on the precompile command. The user source file precompiles the source to a temporary source file member. This member is then compiled into a module that binds to a program.

With a distributed non-ILE Db2 for i program, you must manage the original source, the resulting program, and the resulting package. The following figure shows the objects and the steps that occur during the precompile and compile processes for a distributed non-ILE Db2 for i program. The user source file precompiles the source to a temporary source file member. This member is then compiled into a program. After the program is created, an SQL package is created to hold the program.

With a distributed ILE Db2 for i program, you must manage the original source, module objects, the resulting program or service program, and the resulting packages. An SQL package can be created for each distributed module in a distributed ILE program or service program. The following figure shows the objects and the steps that occur during the precompile and compile processes for a distributed ILE Db2 for i program. The user source file precompiles the source to a temporary source file member. This member is then compiled into a module that binds to a program. After the program is created, an SQL package is created to hold the program.
