Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DB2/AS400 Batch Transactions

Status
Not open for further replies.

pterochild

Programmer
Apr 18, 2002
8
CA
Hi all,

I am looking for the keywords/commands in a db2/as400 environment that allow batch transactions to occur. Basically, I need to:

(This is not my code, nor my choice of programming language, so please be gentle)

On [Error] then go to *ErrorCapture*

BeginTransaction (this is where I'll need the keyword to send the command to the system; all systems seem to be unique)

Update...<parameters>
Update...<parameters>
Update...<parameters>
(...as many updates as are needed)

COMMIT (I'll send this command to the system if all updates have been successful and no errors have been generated)

*ErrorCapture*
If Error then
ROLLBACK (I'll send this command only if an error is triggered in the above Update code. this will effectively undo all updates since the "BeginTransaction" keyword was sent)
Messagebox "Tell the user an error has occurred"
End if

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top