What is the execution result when a DB2 program is compiled and binded on separate days?


Problem: The DB2 program PROGA was changed and compiled, but it was binded after 3 days. What will happen if we execute this program on the 4th day?

Solution

The pre-compiler inserts the current timestamp in the modified source code and in DBRM. In case of modified source code, this timestamp is passed on to the load module and in case of DBRM the timestamp is passed on to the package. At the time of program execution, the timestamp of load module and package is compared. This comparison takes place to ensure that the correct version of package and load module is executed.

As per the given scenario, the compilation is already done and the binding is done after 3 days. The timestamp is inserted during the pre-compilation step and pre-compilation takes place before compilation step. Therefore, the same timestamp was inserted in DBRM as well as in the load module and this will not cause any timestamp mismatch issue. The program will execute without any error.

The BIND has no impact on the timestamp so even if the BIND is done on some other day, the DBRM and modified source code have pre-compilation timestamp and the same timestamp will be passed on to the package and load module respectively. This will not cause any issue during the program execution.

Updated on: 01-Dec-2020

105 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements