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



Hi Tim,

The following CL displays "&Active = N" even when the program 'SORENTCL' is
running.
[SNIP]
AlcObj Obj((ExPrdPgm/SORENTCL *Pgm *Excl)) Wait(0)

Running a program doesn't put a lock on the disk object. That's why you can recompile a program while someone is using it (unlike a *FILE)


Though, if you wanted to make it work, you could have SORRENTCL do an ALCOBJ on itself when it runs. That would make the ALCOBJ command fail in other applications.

That's the method that I use when I want to make sure that only one person is running a given program at a time.

I included a sample of this technique in my newsletter. You can read it at the following link (requires a Pro membership to the iSeries Network):
http://www.iseriesnetwork.com/article.cfm?id=18065


If you don't have a membership let me know, it's a simple program, I can write a different sample pretty quickly that I could post here.


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.