Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
DB2 COMIT IN COBOL/IMS/DB2 PROGRAM

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
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    Post subject: DB2 COMIT IN COBOL/IMS/DB2 PROGRAM
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: Kentucky, USA

PostPosted: Wed Jan 04, 2006 9:35 pm    Post subject: Re: DB2 COMIT IN COBOL/IMS/DB2 PROGRAM
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    Post subject: Re: DB2 COMIT IN COBOL/IMS/DB2 PROGRAM
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    Post subject: Re: DB2 COMIT IN COBOL/IMS/DB2 PROGRAM
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    Post subject: Re: DB2 COMIT IN COBOL/IMS/DB2 PROGRAM
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    IBMMAINFRAMES.com Support Forums -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to display offset thru cobol prog... tvinodkumar7 CICS 1 Sun Apr 22, 2018 8:42 pm
No new posts Linkage editor is part of COBOL, z/OS... ankit.jain COBOL Programming 4 Fri Apr 20, 2018 4:17 pm
This topic is locked: you cannot edit posts or make replies. Difference between EQUAL and EQUAL TO... jithinraghavan COBOL Programming 3 Thu Apr 19, 2018 2:22 am
No new posts How do you attach a DB2 plan to a CIC... John Poulakos DB2 0 Wed Apr 18, 2018 1:49 am
No new posts Call COBOL or PLI with a click from w... vaibhav gs All Other Mainframe Topics 1 Mon Apr 16, 2018 7:29 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us