Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm
No new posts pre-compiler for program in an HFS Pedro DB2 0 Fri Jun 23, 2017 11:13 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us