|
You can use RTNDTA as follows:
................
Use RTNDTA to allow an RPG III program to perform file maintenance
with less locking of records in the database. For instance, the
program reads a database record and displays the record at the
display device. The workstation user reviews the record, makes any
required changes, and presses the Enter key. While the workstation
user is making changes, the database record, if locked, is
unavailable to other programs. Hence it is recommended to leave
the database record unlocked. However, when the program reads the
record from the display and updates the database record, the
database record overlays the internal representation of the
display record in the program. Instead of preventing the overlay
by using different field names for the display record and the
database record, the program rereads the display file. With RTNDTA
specified, the program retrieves the display record again and can
then finish updating the database.
So, without making too many changes and breaking something, I figure I should be able to:
1. READ the record (with no lock)
2. Present the data to the screen
3. Edit the data as usual
4. READ the record again with lock for update
5. Update the record releasing the lock.
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.