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 SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm
No new posts Submit job from Cobol with input data abdulrafi COBOL Programming 4 Wed Feb 01, 2017 12:41 pm
This topic is locked: you cannot edit posts or make replies. COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am


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