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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am

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