COBOL + DB2 complication process.
There are various step involved before we run/execute a COBOL + DB2 program.
Below step are the various steps.
1. Precompile.
2. Compiler.
3. Link edit.
4. Bind.
5. Package & plan.
Step 1: Precompile COBOL
compiler did not understand about SQL statement so, it undergoes to precompile.
In precompile.
1. Expands all include copybooks which are written in program.
2. Extracts all SQL statements into DBRM and SQL statement are convert into call statements.
3. Generates timestamp for modified source codes and DBRM .there are checked at run time.
4. Check syndicated error of sql statements and validates the fields based on the table declaration from dclgen copybook.
Notes: precompile can be executed even if DB2 is down.
DSNHPC -----------it is the program used for precompilation.
Step 2: Compile It is same as normal COBOL compilation.it takes modified source as input and compilers.
IGYRCTL--------This program is used for compilation.
Step 3: link edit This takes object module from compiler step and also takes sub program load modules and generates load module.
IEWL-------------it is program to link edit object module.
Step 4: Bind
DBRM which is extracted in the precompilation is not in executable.it has undergo through bind process which makes statements executable.
steps involved into BIND are
1. Checks all syntax SQL queries with the DB2 cataloged entries. Ex: Table name, column names.
2. Check authorization of the programmer on the SQL statement.
3. It checks syntax of SQL queries which are left by precompile.
4. It creates a package which contains optimized access path. (Optimized is sub component of BIND, which will use statistics).
5. Statistics as input generated by runstarts utility from DB2 catalog.
What is DB2 catalog?
It is DB2 sub-system object repository; it contains system-defined tables like SYSTABLE, SYSCOLUMNS, SYSVIEWS, SYSINDEXES………………….
What do mean statistics?
No of cols, types of index, no of indexes, no of views, types of query, no of cols…………….
What is a package?
A package is single bounded DBRM . packages are output of the bind package command which takes DBRM as input. There can be one DBRM per packages.
This package are not in executable so, we use PLAIN in order to execute Package. Group of packages is called collection.
There are various step involved before we run/execute a COBOL + DB2 program.
Below step are the various steps.
1. Precompile.
2. Compiler.
3. Link edit.
4. Bind.
5. Package & plan.
Step 1: Precompile COBOL
compiler did not understand about SQL statement so, it undergoes to precompile.
In precompile.
1. Expands all include copybooks which are written in program.
2. Extracts all SQL statements into DBRM and SQL statement are convert into call statements.
3. Generates timestamp for modified source codes and DBRM .there are checked at run time.
4. Check syndicated error of sql statements and validates the fields based on the table declaration from dclgen copybook.
Notes: precompile can be executed even if DB2 is down.
DSNHPC -----------it is the program used for precompilation.
Step 2: Compile It is same as normal COBOL compilation.it takes modified source as input and compilers.
IGYRCTL--------This program is used for compilation.
Step 3: link edit This takes object module from compiler step and also takes sub program load modules and generates load module.
IEWL-------------it is program to link edit object module.
Step 4: Bind
DBRM which is extracted in the precompilation is not in executable.it has undergo through bind process which makes statements executable.
steps involved into BIND are
1. Checks all syntax SQL queries with the DB2 cataloged entries. Ex: Table name, column names.
2. Check authorization of the programmer on the SQL statement.
3. It checks syntax of SQL queries which are left by precompile.
4. It creates a package which contains optimized access path. (Optimized is sub component of BIND, which will use statistics).
5. Statistics as input generated by runstarts utility from DB2 catalog.
What is DB2 catalog?
It is DB2 sub-system object repository; it contains system-defined tables like SYSTABLE, SYSCOLUMNS, SYSVIEWS, SYSINDEXES………………….
What do mean statistics?
No of cols, types of index, no of indexes, no of views, types of query, no of cols…………….
What is a package?
A package is single bounded DBRM . packages are output of the bind package command which takes DBRM as input. There can be one DBRM per packages.
This package are not in executable so, we use PLAIN in order to execute Package. Group of packages is called collection.
No comments:
Post a Comment