While I believe the SQL to the system tables is the best option for your
requirement we use a different approach which is quite generic.

We have a LOCKS table in a common library and a service program to add a
lock, remove a lock and check locks.

The table has the qualified job name and other information as the use of
this method has grown over time.

The addLock writes a record to the file with the required information

The rmvLock deletes the record from the file

The chkLock will return a flag to indicate if a lock exists or not. An
optional parameter on this function is to "Verify" in which case the
procedure will verify if the job with the lock still exists, this solves
the rare situation of a user not logging off or a program ending
abnormally and leaving a record on the locks file.

The chkLock with verify for *ALL locks is also scheduled on a daily basis.

Just my 2 cents.

Don Brown

This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com

This thread ...


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

This mailing list archive is Copyright 1997-2019 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].