Preparing applications for execution
A database application coded in a high-level language has SQL statements embedded in it. Before we can execute the application, it is precompiled, bound to the database, and then compiled to generate an assembly code. During the precompilation and binding processes, we have many options that can control the environment for application execution.
Precompilation is the process of separating SQL statements from application logic. Applications that do not have any embedded SQL statements don't need to be precompiled. When an application is precompiled, a bind file is generated. This bind file has information on all SQL statements contained in the application. All SQL statements in the application source file are commented as a result of precompilation and are replaced with DB2 runtime API calls for these statements.
Binding is the process of compiling all SQL statements contained in the bind file. The result of binding is a package. This package contains...