That caused the STRSQL session to hang and eventually abend with a record in

multi user databases are needing record locks and timeouts to synchronize data access. This could cause problems for long lasting locks (record is locked longer than waitrecord). This could occur with and without commit controll. As a conclusion of this a user transaction must be shorter than a database transaction. In your case begin of transaction (first write operation after last commit) must not overlap any user transaction (EXFMT od READ of DSPF). So STRSQL will only wait millisecond and go on. It might be a good idea to adjust waitrecord of your files (60 seconds default are by far too much!!!)

This can't be the answer because most of the other programs using the files
will not have any form of commitment control. I am only adding it to this
program so the users can cancel their changes and rollback.

You will see the same problem (hanging until record wait and abort), if you read for update, giving controll back to user, write the record some minutes or hours later on.
Commit is designed for writing multiple records in one transaction (e.g.: transfer of goods from one stock to another) Without commit it could happen seeing the goods twice or temporary disappearing. Doing it the right way, your application holds all changes internally and when the user decides to make the transaction happen, all changes are made without giving controll back to the user. In case of success of all updtaes the programm would issue a commit, in case of error rollback.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 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.