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



Adrienne,

For objects in the QSYS.LIB file system, you could either try using the 
QWCLOBJL API or call a CL using the ALCOBJ command.  If you use ALCOBJ, 
you will have to monitor (coding a MONMSG command) for the possible 
errors.  QWCLOBJL is the List Object Locks API.  If an object is not in 
use, you should get an empty list returned to your user space.  The API is 
more flexible and gives more detailed results, but if all you are after is 
to see that the object is not in use, I would probably go with the ALCOBJ 
command in a CL.  If you haven't worked with the list APIs before, there 
could be quite the learning curve.

Checking the status for files in another file system will depend on the 
system.  I've done very little of that kind of checking outside QSYS.LIB.

Michael Quigley
AS/400 Programming Section
The Way International
www.TheWay.org

cobol400-l-bounces@xxxxxxxxxxxx wrote on 10/09/2006 01:00:02 PM:

date: Mon, 9 Oct 2006 10:58:28 -0500
from: "Adrienne McConnon" <Adrienne.McConnon@xxxxxxxxxxxx>
subject: [COBOL400-L] IS OBJECT BEING ACCESSED BY ANOTHER PROCESS -
   AND WHAT   IS THE PROCESS

Hello all,

I am trying to find a means by which to determine if an object (root or
on qsys.lib), is being accessed and what is accessing the object.  I
thought that calling a cl from within my cobol program that comtained
the DSPAUT command would return an 'object busy' type status, but it
does not do that if I have the object in edit mode in the root file
system.  Before processing the file, I want to know that it is not being
accessed by another process or person.  Is there a way to just check
this status, or will I have to attempt to lock a file and then let it
fail (not my qst choice)?

Thanks,

Adrienne McConnon
Vercuity - Parsippany - NJ


------------------------------

-- 
This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) digest 
list
To post a message email: COBOL400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/cobol400-l
or email: COBOL400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/cobol400-l.



End of COBOL400-L Digest, Vol 4, Issue 101
******************************************



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.