COBOL DB2 Compilation Process (COBOL+DB2) |
DB2 precompilation is the first step in the COBOL DB2 program Compilation Process. DB2 precompilation is mandatory because host language compilers cannot process a SQL statement. DB2 precompiler or DB2 SQL coprocessor processes the embedded SQL statements.
Scenario: Let’s say you have been asked to compile a COBOL DB2 program but being a new team member you don’t know how to compile a COBOL DB2 program or what the steps are involved in compiling a COBOL DB2 program.
In this session, you’ll learn the basic concept of the DB2 precompilation process. You’ll get an overview of the DB2 precompiler, DB2 coprocessor, Database Request Model (DBRM), and Consistency token. You'll go through a complete flow diagram of the COBOL compilation process. Let’s get started with the COBOL DB2 compilation process.
COBOL+DB2 Compliation Process - Agenda.
- Introduction to DB2 precompilation process.
- What are COBOL DB2 Programs or DB2 Applications?
- DB2 Precompilation process functions.
- DB2 precompiled flow diagram.
- DB2 coprocessor flow diagram.
- COBOL DB2 programming performance tips.
- Conclusion.
Introduction to DB2 precompilation process.
What is COBOL DB2 Program or COBOL DB2 Application?
DB2 Precompilation Function
Why do you need a DB2 precompilation process for any COBOL DB2 application?
COBOL DB2 Applications included SQL statements to perform various data manipulation operations and SQL statements cannot be processed by host language compilers such as COBOL, C++, Java, etc. To process these SQL statements, you required either a DB2 precompiler or a DB2 coprocessor.SQL statement processor performs the following actions:
- Replaces the embedded SQL statements with equivalent calls to DB2 language interface modules.
- Generate a database request module (DBRM), which communicates your embedded SQL requests to the DB2 database engine during the binding process.
Now. let's focus on the DB2 precompilation process by using the DB2 precompiled.
COBOL DB2 Compilation Process
- COBOL DB2 program source code is processed by a DB2 precompiler. It generates two outputs (i.e. Modified Source code and Database Request Module (DBRM)).
- Modified source code is a compiled and link-edit like a simple COBOL program because it does not have any SQL statements. The SQL statements are already replaced with an equivalent call to the DB2 language interface.
- Database request modules (DBRM) are bind into the package or directly into an application plan. The DB2 bind process converts the SQL statement into an executable runtime instruction.
DB2 precompilation by using DB2 coprocessor. |
DB2 precompilation by using DB2 coprocessor.
Topictrick Youtube: The DB2 precompilation process is associated with a youtube video tutorial.
Conclusion.
Finally, this marks an end to our today's COBOL+DB2 compilation process tutorial. COBOL DB2 compilation process is a two-step process i.e. COBOL+DB2 Pre compilation process and COBOL program compilation process. Do check out COBOL LEVEL 88 Condition.
No comments:
Post a Comment