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

DB2 COMIT IN COBOL/IMS/DB2 PROGRAM


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
slnprasanna

New User


Joined: 24 Dec 2005
Posts: 3

PostPosted: Wed Jan 04, 2006 7:45 pm
Reply with quote

How do we comit a db2 insert query before GOBACK statement in a cobol/ims/db2 program.
Back to top
View user's profile Send private message
muffirulz

New User


Joined: 14 Sep 2005
Posts: 74
Location: Atlanta, (USA)

PostPosted: Wed Jan 04, 2006 9:35 pm
Reply with quote

hi

after the insert staement just give a commit statement as follows

EXEC SQL
COMMIT
END-EXEC

this will commit all your previous changes.

cheers
Back to top
View user's profile Send private message
gowtham_1982
Warnings : 1

Active User


Joined: 02 Dec 2005
Posts: 109

PostPosted: Thu Jan 05, 2006 10:17 am
Reply with quote

slnprasanna wrote:
How do we comit a db2 insert query before GOBACK statement in a cobol/ims/db2 program.



hai slnprasanna

after the insert query you just check the sqlcode. if its zero or anyother desired value, you give a COMMIT statement.

but i think by default there will be AUTOCOMMIT or AUTOROLLBACK option set which will take care of COMMIT or ROLLBACK based on the sqlcode return code. Please check whether that is the fesility available in your shop.

corrections welcomed...


gowtham
Back to top
View user's profile Send private message
slnprasanna

New User


Joined: 24 Dec 2005
Posts: 3

PostPosted: Thu Jan 05, 2006 9:22 pm
Reply with quote

Quote:
thanks alot to one & all


cheers
Prasanna kumar S.L.N
Back to top
View user's profile Send private message
slnprasanna

New User


Joined: 24 Dec 2005
Posts: 3

PostPosted: Thu Jan 05, 2006 9:22 pm
Reply with quote

Quote:
thanks alot to one & all


cheers
Prasanna kumar S.L.N
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 -> IMS DB/DC

 


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