Suppose there is cobol-db2 program.I made changes only in the cobol program.Is there need recompile the DBRM again?why?

Showing Answers 1 - 11 of 11 Answers

jnana

  • Oct 29th, 2005
 

Yes .definitely we have to precompile . because from the precompilation we r getting sorce code and the dbrm.

  Was this answer useful?  Yes

poovendran

  • Nov 22nd, 2005
 

since during precompilation, a timestamp is given to both the COBOL code and DBRM, this will be identified at the time of execution. So, even a DBRM has to be bound.

  Was this answer useful?  Yes

sunil

  • Dec 31st, 2005
 

compalsory u have to complie the program because

other wise u will get the timestamp mismatch error.

because the load librari is having some timestamp and application plan is having some timestamp while execution time the two timestamp have to match other wise u will get error. ok bye bye

  Was this answer useful?  Yes

Culver_lake

  • Mar 18th, 2006
 

Sorry guys but it can be done.  It's not recommended but you can pass an identifier through the precompiler LEVEL keyword to bypass the timestamp in the dbrm and the load module and thus avoid having to REBIND after COBOL changes. Of course if any SQL is changed than a BIND is necessary.

This is a little known option, check it out in the Programmers guide.

  Was this answer useful?  Yes

Seema Nair

  • Apr 5th, 2006
 

I have a doubt here.If we are calling DB2 sub module dynamically,then is there still a need to compile the sub-module? I guess not.Only for static calls,we  need to compile both main and sub pgms

I use endevor for compilation.

Please correct me if im wrong

  Was this answer useful?  Yes

ed Di

  • Apr 5th, 2006
 

If you are calling a cobol program (submodule) that contains SQL and you change the CALLING program, there is no need to recompile the CALLED programs whether or not they are statically linked or dynamically linked. Each module containing sql must be precompiled and the SQL in the DBRM must be input to BIND.

  Was this answer useful?  Yes

<quote> If you are calling a cobol program (submodule) that contains SQL and you change the CALLING program, there is no need to recompile the CALLED programs whether or not they are statically linked or dynamically linked. Each module containing sql must be precompiled and the SQL in the DBRM must be input to BIND. </quote>

(A)

If pgms are linked statically, you create one load module from calling and called pgms together hence you will need to recompile AND rebind wether you did or didn't any changes in SQL.

If pgms are linked dynamically the only program you will need to recompile(rebind if sequal involved) is the one you modified.

($.02) It's a good practice to break-up sequal statements onto different sub-programs or stored procedures.

  Was this answer useful?  Yes

Hi,
when you first compile a cobol-db2 program the cobol precompiler seperates all your cobol statements and DB2 statements into two seperate modules.The module containing the DB2 statements is called the DBRM.
Now while binding a package for your cobol-db2 program what you ar doing is joining both of these modules .These realted modules are identified by a unique consistency token and time stamp attached to each of them at the time of seperation.

Now coming to your question:
Yes,you definetely need to recompile the DBRM again else which the consistency tokens and timestamps will be different in your DBRM and cobol module which will result in an -805 sql return code while binding your package.


Whew.....     

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions