[Info-vax] Ken Coar's OpenVMS Lock utility sources are available on Sourceforge.
Jon Pinkley
jon.pinkley at gmail.com
Fri Nov 6 18:12:17 EST 2020
On Friday, November 6, 2020 at 11:36:05 AM UTC-5, Stephen Hoffman wrote:
> On 2020-11-05 08:03:00 +0000, Jon Pinkley said:
>
> > In 1998, Ken Coar submitted the LOCK utility to the DECUS VAXSIG tape.
> > ...
>
> FWIW...
>
> There've been a few other DLM-from-DCL utilities available over the
> years, too. Here are two more:
>
> https://www.digiater.nl/openvms/freeware/v80/lck/freeware_readme.txt
> http://mail.digiater.nl/openvms/decus/vax92b/netlock/aaareadme.txt
>
> More than a few other apps use lock files for this purpose, as that
> tends to be somehwat more portable. And that approach can work from
> DCL, too.
Of the above two, the LCK is more like LOCK, in fact it almost looks like it was written to replace LOCK which was never released for the Alpha on the DECUS tapes or freeware. From the Docs, it appears to be a proper subset of what LOCK provides. For example, the only mode is EXCLUSIVE. It doesn't support passing info with the value block. Still useful for the most used case, and my intent isn't to denigrate the LCK or NETLOCK utilities, they are useful and the authors were kind to share their work.
As far as portability, my argument is that if you are using DCL, it probably isn't a big issue, because you have already decided that portability isn't the most important issue.
I am showing my ignorance here, but how do you implement the equivalent of waiting for a lock with a lock file (queuing a lock request, $ENQ)? I can understand how the equivalent of lock/nowait/mode=exclusive could be done with a lock file, but waiting? It seems to me that would involve polling.
More information about the Info-vax
mailing list