January 18

0 comments

Commitment Control on the old AS400 and iSeries machines

By NickLitten

January 18, 2013

#Commitment, #control, #journal

another snippet from an old document I found in a dim dark and hazy corner of an even older HDD… rather than let it disintegrate, here it is migrating to the web just in the (extreme) off chance that it may be useful to someone out there. Hey.. if YOU are reading this then its done its job 😉

Commitment control lets you define and process a number of changes to database files in a single unit (transaction). Commitment control can ensure that complex application transactions are logically synchronized, even if the job or system ends. Two-phase commitment control ensures that committable resources, such as database files on multiple systems, remain synchronized.

Transactions

A transaction is a group of changes that appear as a single change, such as the transfer of funds from a savings account to a checking account. Transactions can be classified as follows:

  • Inquiries in which no file changes occur.
  • Simple transactions in which one file is changed each time you press the Enter key.
  • Complex transactions in which two or more files are changed each time you press the Enter key.
  • Complex transactions in which one or more files are changed each time you press the Enter key. These changes represent only part of a logical group of transactions.

Revisions made to files during transaction processing are journalled when using commitment control.

If the system or job ends abnormally, journaling alone can ensure that, at most, only the very last record change is lost. However, if the system or job ends abnormally during a complex transaction, the files reflect an incomplete logical transaction. For example, the job may have updated a record in file A, but before it updated a corresponding record in file B, the job ended abnormally. In this case, the logical transaction consisted of two updates, but only one update completed before the job ended abnormally.

Benefits of using commitment control

Recovering a complex application requires detailed application knowledge. Programs cannot be restarted. For example, record changes may have to be made with an application program or data file utility to reverse the files to just before the last complex transaction began. This task becomes more complex if multiple users were accessing the files at the same time.

Commitment control helps solve these problems. Commitment control locks records from other users during a complex transaction. This ensures that other users do not use the records until the transaction is complete. At the end of the transaction, the program issues the commit operation, freeing the records. However, should the system end abnormally before performing the commit operation, all record changes for that job since the last time a commit operation occurred are rolled back. Any affected records that are still locked are then unlocked. In other words, database changes roll back to a clean transaction boundary.

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Join the IBM i Community for FREE Presentations, Lessons, Hints and Tips

>

Snug CBD

 20% Discount

I have partnered with SNUG CBD givING you Organic CBD
20% discount code "NL20"