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



Sorry, but I don't understand which "program" is interactive and which is batch. I assume that since you mention night that you are running a batch process that sometimes fails because an interactive user has a record locked, but I could be wrong. Maybe it is the other way around.

Anyway, some theoretical suggestions, which I recognize may not be practical in your situation.

1) Change the interactive program to use optimistic locking. i.e., simply read with no lock and don't read for update until you are about to actually change the record. Then if the underlying record was changed by someone else tell the user and have him start over.

2) Stop the user doing any updating while the batch process runs. Might work if the batch run is relatively short. Various ways you could do this.

3) Change the interactive program to trap the record locked error when you try to update and pop up a window showing who has the lock and allow a retry.

Cheers,

Sam

On 5/13/2021 12:30 PM, dfreinkel@xxxxxxxxxxxxxxxxx wrote:
I have not done this before and so it trial and error to get this to work.


Situation:

At night, a user is updating shipments. There is a record lock. It causes
the program to crash. I have added code so that is does not crash.


Problem:

Whilst still in the program, I need to send a message to the program so that
a message will appear on the screen showing who has the record locked.


Done so far:

* Changed the WAITRCD(3).
* SNDPGMSG to the program queue with status(*STATUS).
* The message is not displayed until the next EXFMT.


What I want to do:

* Have the message display in the message subfile immediately, before
the EXFMT.
* Whilst the lock is only 3 seconds, the delays are too long and so
the user needs to see it immediately.
* When this happens at midnight, I get a call to fix the problem. Now
I will not get the call, but because the message is not shown immediately,
the users will simply cancel the program clicking on the red X and trying to
start again. That will make it more of a mess to fix.
* I do, do a EXFMT again but the message is not always displayed.
* The SNDPGMMSG could be called from a program that is called by the
program doing the EXFMT.


Any suggestions?


Thanks


Darryl Freinkel

A4G

Telephone: 770.321.8562 Mobile: 678.355.8562




As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.