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



Hello Vinay,

Am 22.02.2022 um 17:43 schrieb Vinay Gavankar <vinaygav@xxxxxxxxx>:

I am new to using commitment control.

Me also. :-) But I think your problem isn't related to commitment control, but to locking.

I understand that the record will be kept locked until the transaction is committed, but I was thinking that another program in the same job opening the file under Commit should be able to access it.

What exactly means "access" in this context? Are you doing a READ/CHAIN, or a READ(N)/CHAIN(N)? I'd expect the former to fail, because a record lock is AFAIK tied to a program.

What would you expect the OS to do if a record is locked and another lock request comes in, no matter from where?

If your program B were a thread of program A, thus sharing all memory locations, including what makes the OS recognize a lock, it might be possible to "access" that record. Using threads in RPGLE seems to not have been very famous amongst programmers, according to what I've picked up in this list and various online sources over the course of years.

The only option with my current understanding about your issue is you need to release that lock before calling program B. Depending on the scope of commitment control, what program B does can be part of the currently active transaction, though.

:wq! PoC


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.