How the DB2 application program works on Mainframe continued...

The pre-compilation timestamp token placed by DB2 pre-compiler on the Modified source code can be found in variable SQL-TIMESTAMP-1 SQL-TIMESTAMP-2 in Listing.



COBOL Compiler (IGYCRCTL):

The modified source code out of the DB2 pre-compiler will now fed to the COBOL compiler. The compiler will check the code for syntax error and creates the OBJLIB (Object Library)

Link-Edit (IEWL) :

IEWL is the program which link-edit the OBJLIB created in previous step by Cobol compiler to create a LOAD MODULE (The corresponding machine level code of our main DB2 Application program)


BIND :

The second part created out of DB2 Pre-compiler (DBRMLIB) will now get processed.
The Bind is type of compiler to the SQL statement (DB2 statement).It will read the DB2
Statement from the DBRMLIB and check it for syntax error and create a mechanism to
to execute the SQL statement.

There are two types of BIND, BIND PLAN and BIND PACKAGE.


BIND PLAN:

This will have the one or more DBRM, Packages or the combination of DBRM and Package as an input. The BIND PLAN command will invoke the DB2 Optimizer which intern will create the PLAN containing optimized access path to execute the SQL statement inside DBRM.


BIND PACKAGE:
This will have only single DBRM as an input. The Package created here is not executable and need to be bind to plan again in order to get executed

Widget By Devils Workshop

About This Blog