× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Record Lock message
  • From: boothm@xxxxxxx
  • Date: Mon, 28 Jun 1999 21:25:07 -0400

Rajeev, what does "using a record" mean?  The record needs to only be 
locked and unavailable when it is being changed.  Ordinary READs of the
record can have an (N) to indicate "Not locked" and you will have no
problems with locking records, etc.

For the other problem, when a record is being changed, do all the validity
checking and getting ready to update while the record is still unlocked. 
Save all the original field information in a data structure or something. 
Then when you are ready to do the update, read the record again, (without
the (N) ) and compare the data with the original.  If the data is the
same, then you are good to go.  Make your change and continue.  If the
data just read is different than the data read a few minutes ago, then
another user has already changed the record. Send a message then, saying
the record has already been changed.  

If you use this sort of solution your records will be locked for less than
a second even if a user has a record on the screen and leaves for lunch.




In <8825679E.00606F1B.00@gump.paramount.com>, on 06/28/99 
   at 10:30 AM, "Rajeev Asthana" <Rajeev_Asthana@paramount.com> said:

>Hi All,

>In my application, if someone is using a record and someone else is
>trying to use it, a message should be displayed immediatly stating the
>same together with the user's name who is holding the record.
>What can be the better way to do this?

>Any help appreciated.

>Thanks in advance.

>Rajeev.


>* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>* 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 thread ...

Follow-Ups:
Replies:

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

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.