Application program objects
Several objects are created during the precompile of a DB2® UDB for iSeries™ application program.
DB2 UDB for iSeries supports both non-ILE and ILE precompilers. Application programs can be either distributed or nondistributed.
With DB2 UDB for iSeries, 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 UDB for iSeries program, 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 UDB for iSeries program:
source file member precompiles the source to a temporary source file member. This member is then compiled into a program." />
With a nondistributed ILE DB2 UDB for iSeries 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 UDB for iSeries program when OBJTYPE(*PGM) is specified on the precompile command:
ILE program. The user source file member precompiles the source to a temporary source file member. This member is then compiled into a module which binds to a program." />
With a distributed non-ILE DB2 UDB for iSeries program, 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 UDB for iSeries program:
source file member precompiles the source to a temporary source file member. This member is then compiled into a program. Once the program is created, an SQL package is created to hold the program." />
With a distributed ILE DB2 UDB for iSeries program, 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 UDB for iSeries program:
ILE program. The user source file member precompiles the source to a temporary source file member. This member is then compiled into a module which binds to a program. Once the program is created, an SQL package is created to hold the program." />
The access plans associated with the DB2 UDB for iSeries distributed program object are not created until the program is run locally.
- User source file member
A source file member contains the application language and SQL statements. You can create and maintain the source file member by using the source entry utility (SEU), a part of the IBM® WebSphere® Development Studio for iSeries licensed program.
- Output source file member
By default, the precompile process creates a temporary source file QSQLTxxxxx in the QTEMP library. However, you can specify the output source file as a permanent file on the precompile command.
- Program
A program is an object that is created as a result of the compilation process for non-ILE compilations or as a result of the bind process for ILE compilations.
- SQL package
An SQL package contains the access plans for a distributed SQL program.
- Module
A module is an Integrated Language Environment® (ILE) object that you create by compiling source code using the Create Module (CRTxxxMOD) command (or any of the Create Bound Program (CRTBNDxxx) commands, where xxx is C, CBL, CPP, or RPG).
- Service program
A service program is an Integrated Language Environment (ILE) object that provides a means of packaging externally supported callable routines (functions or procedures) into a separate object.
Parent topic:
Introduction to DB2 UDB for iSeries Structured Query Language
Related tasks
Preparing and running a program with SQL statements