DB2- SQL statements will have to be embedded with any of HLL such as COBOL for it to be executed other than by making use of SPUFI, such kind of Tools.
In this case, COBOL-DB2, normal cobol compiler didn't understand SQL statements. So a precompilation has to be done in which SQL statements would be converted to COBOL equivalent MOVE and CALL statements these resides in DBRMLIB, the other output of this step being the normal Cobol statements segregated from SQL statements, so called as Modified Source program. In this step the following activities occur,
1. Source program gets segregated to DBRM and Modified Source program.
2. The precompiler fixes the TIMESTAMP in both DBRM and Modified Source program.
3. Checks for SQL syntax.
Then this DBRM will come in to play only during BIND operation. Meanwhile the Modified Source program undergoes Normal Compilation, link-editing resulting in a load module.
Now during BIND, it does the following,
1. Checks for authorization.
2. Timestamp check.
3. DBRM are bound to packages which is inturn bound to plan ( executable form ).
Now this plan is executed to get the desired outcome.