|
Commitment control: you, the programmer, have the ability to control when a series of database transactions (writes, deletes, updates to journaled files) is "complete". You execute "COMMIT" in the program when the application has completed the "logical" transaction (which could include thousands of database transactions); you use "ROLBK" (rollback) when you want the system (which is why this is so cool) to undo a partially-completed or failed transaction. The "COMMIT" operation, even though it's used at the completion of a transaction, is actually a starting point for keeping track of journaled database transactions until the next COMMIT or ROLBK. My application (transportation) can include a large number of database transactions when a truck is dispatched: I update the 1-6 equipment master records, add 1-6 history records, update 1-2 driver master records, add 1-2 driver history records, update 1-3 manifest records, add 1-3 manifest history records, update 1-10,000 shipment records, and write 1-10,000 shipment history records. If any part of this process fails (up to the last record), a ROLBK undoes everything since the last COMMIT. Otherwise, a COMMIT finalizes the transaction and starts keeping track of all new database transactions pending the next COMMIT or ROLBK. Buck's right: you should do some reading! -reeve -----Original Message----- From: rpg400-l-admin@midrange.com [mailto:rpg400-l-admin@midrange.com]On Behalf Of Buck Calabro Sent: Monday, October 14, 2002 2:16 PM To: rpg400-l@midrange.com Subject: RE: update in single page subfile >I want to update records in subfile which >is having thousands records(lessthan 10k).. >reading this records is done in single >page)...please suggest me which subfile is good >(loadall/expand/single page)to update and I always use expanding. I don't use scroll bars though, which might be a good reason to load all. >at the same time i should lock the records without >giving chance to others to update...how can i lock >the records? You really want to lock several thousand database records? Commitment control can do this for you, but you need to do some reading so that you understand how it works. There isn't an easy way to explain the details of commitment control in an email exchange. --buck _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.