|
Christian, consider leaving them unlocked until the moment of update. One method to do that is to save the record's contents when first read (mark the read as "not locked") and then at update time read the record (not "not locked") again. If it's data is changed then another workstation just changed the record and you can alert your user and do appropriate actions. Otherwise the record is unchanged and eligible for the immediate update. This does away with a lot of record locking and improves performance because records are locked for just a moment. In <199904300514.HAA06928@osnabrueck.osnabrueck.netsurf.de>, on 04/30/99 at 07:13 AM, "Christian Luebke" <chluebke@gmx.de> said: >Hi, >is it possible to lock more than one record in a file? >I need an indicator that these records are in use and can't be used by >another job. But I do not want to write some data in that file to >indicate this because if my program fails they are locked forever... >Bye, Christian >* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * >* This is the RPG/400 Discussion Mailing List! To submit a new * >* message, send your mail to "RPG400-L@midrange.com". To unsubscribe * >* from this list send email to MAJORDOMO@midrange.com and specify * >* 'unsubscribe RPG400-L' in the body of your message. Questions should * >* be directed to the list owner / operator: david@midrange.com * >* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -- ----------------------------------------------------------- boothm@ibm.net Booth Martin ----------------------------------------------------------- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This is the RPG/400 Discussion Mailing List! To submit a new * * message, send your mail to "RPG400-L@midrange.com". To unsubscribe * * from this list send email to MAJORDOMO@midrange.com and specify * * 'unsubscribe RPG400-L' in the body of your message. Questions should * * be directed to the list owner / operator: david@midrange.com * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.