IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Wil thre b any BIND if we change in compiled COBOL+DB2 pgm?


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
samimaktar

New User


Joined: 03 Aug 2009
Posts: 25
Location: Singapore

PostPosted: Fri Oct 30, 2009 3:03 am
Reply with quote

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
View user's profile Send private message
samimaktar

New User


Joined: 03 Aug 2009
Posts: 25
Location: Singapore

PostPosted: Fri Oct 30, 2009 3:08 am
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Oct 30, 2009 5:49 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top