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

Compilation and Binding of Cobol-DB2 program.


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Bharath Nadipally

New User


Joined: 24 Jun 2008
Posts: 22
Location: Hyderabad

PostPosted: Tue Sep 30, 2008 12:58 pm
Reply with quote

I am raising this question as I am on bench and dont have access to mainframes to test it.

I have a existing cobol-db2 program, modified the cobol code(not db2 queries), compiled it but dint bind it. If I try to run it, will it give SQLCODE -818 (Timestamp mismatch)? Or It depends on pre-compiler option?
Back to top
View user's profile Send private message
ksk

Active User


Joined: 08 Jun 2006
Posts: 355
Location: New York

PostPosted: Tue Sep 30, 2008 2:29 pm
Reply with quote

Gives TIme Stamp Mismatch error.
Back to top
View user's profile Send private message
Bharath Nadipally

New User


Joined: 24 Jun 2008
Posts: 22
Location: Hyderabad

PostPosted: Tue Sep 30, 2008 2:42 pm
Reply with quote

As I am not doing any DB2 query changes in program, I dont want to bind it again. Is it possible by using any of Pre-compiler options?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Sep 30, 2008 3:36 pm
Reply with quote

Quote:

I dont want to bind it again


until you bind it again,
you will continue to receive some time of sql error return code
when you try to execute the module.
Back to top
View user's profile Send private message
ramakrishnag

New User


Joined: 10 Sep 2008
Posts: 6
Location: india

PostPosted: Tue Sep 30, 2008 5:12 pm
Reply with quote

Hi,

Bind is not thing but the SQL code internally converting into Cobol code.

So, even you have not done any code changes at DB2 part, still you have to bind once again.

The code will be inserted in during the compilation.

Thanks,
Rama
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Sep 30, 2008 9:12 pm
Reply with quote

RAMA,

what you described is the precompiler step.


The bind does not even look at the source or load module. only deals with the dbrm.



it is Pre-compile (build DBRM, insert COBOL code)
compile convert source program to object module
BINDER (know as the linkage-editor) convert OBJECT into EXECUTABLE
DB2 BIND - proofs dbrm against db2 catelog.

pre-compile, compile, linkedit are done without db2 running.
you need db2 to perform a db2 bind.

and no, that is not a definitive list of everything that goes on. but was a little more expansive and correct than what you stated.
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
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
Search our Forums:

Back to Top