View previous topic :: View next topic
|
Author |
Message |
samimaktar
New User
Joined: 03 Aug 2009 Posts: 25 Location: Singapore
|
|
|
|
Hi Friends,
Consider we have a compiled COBOL+DB2 program.Now if there is any change in COBOL source code(no change in SQLCODE),will there be BIND operation or only COBOL code compilation? |
|
Back to top |
|
|
samimaktar
New User
Joined: 03 Aug 2009 Posts: 25 Location: Singapore
|
|
|
|
My Answer: No BIND operation will be there.If a COBOL+DB2 program consists of 100 sqlcode and it is already compiled then why to compile all these sqlcode again for a change in cobol code. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Short answer, you are wrong-
To compile cobol with imbedded sql means
you have to go thru the db2 precompiler to generate cobol calls for the sql.
Without the precompile, the cobol source will not compile.
The precompiler generates a dbrm which will be generated with a timestamp token
that has to match the timestamp token in the generated object
output of compile.
the load module (output of the linkedit or binder [not to be confused with a DB2 bind] step)
will carry forward the timestamp token
which has to match the timestamp token that is in the db2 catalogue
placed there by the db2 bind.
You will receive a -805 sql code when you attempt to execute the new load module
without first performing a bind
which you erroneously believe does not have to be accomplished.
Here are a couple of links link-one and link-two that you should read - at a minimum.
if you are serious about learning db2, suggest you follow links contained in the material above.
i expect any future questions from you to reflect a level of understanding beyond being able to spell db2. |
|
Back to top |
|
|
|