|
If you want to check for the lock on a member of file, specify it on the ALCOBJ command. e.g., 'ALCOBJ OBJ((Z13WORK/UEC101 *FILE *EXCL member-name)) WAIT(0)' A couple of points for which you should be careful: 1) If you really want to check want to know if the file is in use, I would use an *EXCL (exclusive) lock rather than a *SHRRD (shared for read) lock. 2) CHKOUT will not work for source physical files nor any file in the QSYS.LIB file system. (Please see 'Restrictions:' under the help text for the command.) Regarding using the QWCLOBJL API, make sure it is coded as a program call *not* a procedure call. I believe program calls are the default. However, several things can change that. If you've got a 'PROCESS LINKPRC', a 'LINKAGE IS PROCEDURE', or another statement changing the default call behavior, you would need to code "CALL PROGRAM 'QWCLOBJL'." Michael Quigley AS/400 Programming Section The Way International www.TheWay.org cobol400-l-bounces@xxxxxxxxxxxx wrote on 10/11/2006 11:46:01 AM:
date: Tue, 10 Oct 2006 13:29:05 -0500 from: "Adrienne McConnon" <Adrienne.McConnon@xxxxxxxxxxxx> subject: Re: [COBOL400-L] COBOL400-L Digest, Vol 4, Issue 102 Michael, Thanks so much - I will try the QWCLOBJL API. I also tried the CHKOUT command from the command line - I must say I was very disappointed in the response time it took to get back the busy message to me. I will assume that the API will be faster than CHKOUT. Also, I tried the ALCOBJ from the command line, on a file that was texted into editor in another session, but it did not return a 'busy' message to the session on which I administered the ALCOBJ command. I did not have a wait parm. This is what I entered: alCOBJ OBJ((Z13WORK/UEC101 *FILE *SHRRD))
. . . . . . . . .
date: Wed, 11 Oct 2006 10:47:06 -0500 from: "Adrienne McConnon" <Adrienne.McConnon@xxxxxxxxxxxx> subject: Re: [COBOL400-L] COBOL400-L Digest, Vol 4, Issue 102
Michael,
I tried the QWCLOBJ call and cannot compile. Noe I have not used the list API's before - but I have used others - am I missing a binding dir or something in the compile . . .
<snip>
As an Amazon Associate we earn from qualifying purchases.
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.