View previous topic :: View next topic
|
Author |
Message |
slnprasanna
New User
Joined: 24 Dec 2005 Posts: 3
|
|
|
|
How do we comit a db2 insert query before GOBACK statement in a cobol/ims/db2 program. |
|
Back to top |
|
|
muffirulz
New User
Joined: 14 Sep 2005 Posts: 74 Location: Atlanta, (USA)
|
|
|
|
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 |
|
|
gowtham_1982 Warnings : 1 Active User
Joined: 02 Dec 2005 Posts: 109
|
|
|
|
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 |
|
|
slnprasanna
New User
Joined: 24 Dec 2005 Posts: 3
|
|
|
|
Quote: |
thanks alot to one & all |
cheers
Prasanna kumar S.L.N |
|
Back to top |
|
|
slnprasanna
New User
Joined: 24 Dec 2005 Posts: 3
|
|
|
|
Quote: |
thanks alot to one & all |
cheers
Prasanna kumar S.L.N |
|
Back to top |
|
|
|