× 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.



Patrik,

I don't have an answers to you technical question, but I have some observations and a suggestion:

1) It has been my experience that users rarely pay any attention to the error message line. (Yours may be different.)
2) Locked records definitely happen with an old code base, but generally are the exception in the larger updating process. (Again, your situation may be different.)

So, my suggestion for the user interface would be that when the subfile program doing the 2=Change finds a record locked, it pops up a window that says something like
"Record locked by (...)
Enter D to display read only. Or press enter to continue.".
When the user responds you decide what to do.

And in your update and display screens you might also want to add "Update" or "Display" in the screen header.

You can modularize this as you see fit.

Granted this is a slightly longer user interaction, but I think it will happen rarely and will be much more intuitive to the users when it does occur.



Sam

On 1/30/2020 1:15 PM, Patrik Schindler wrote:
Hello,

maybe there are other approaches to my message line issue? I'll describe what I want to achieve.

I have a program displaying records in a SFL. When using Option 2=Change, a SR (CHGREC) is executed which tries to CHAIN(E) to the record in question, so it is properly locked. The SFL is still visible on screen. If that succeeds, a detail-screen (in the same DSPF) is brought up via EXFMT which allows changing stuff.

If %STATUS of the PF (from the CHAIN mentioned above) yields 1218, the record has been locked by someone else. This makes the program call another SR (DSPREC) (which is normally called by using Option 5=Display). That SR does a CHAIN(EN), changes a few indicators to make the detail-screen appear readonly, and also does an EXFMT to actually display content.
The user has access to the data in question read only now, which is better than no access at all. This already works.

My goal is: I want the user to be notified my a message in the message line that the record has been opened read only, because it's already in use.

Since there are more error conditions (duplicate key, record not found, etc.), the DSPF has set a global ERRSFL keyword.

I had part success by (for a test) hard coding a WRITE to the details-record, setting the appropriate IN for the matching ERRMSGID to be shown and then do the EXFMT. But because ERRMSGID is tied to a field, that field is highlighted which is not what I want to achieve.

I'm happily awaiting proposals how to achieve "simply" showing a message as described above. :-) Thank you for your time and effort.

Oh, please refrain from discussions about the drawbacks of locks, people leaving their screen for long time, etc, because it's out of scope for this purely technical question. Thank you. :-)

:wq! PoC

PGP-Key: DDD3 4ABF 6413 38DE - https://www.pocnet.net/poc-key.asc



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.