MIDRANGE dot COM Mailing List Archive

Home » MIDRANGE-L » December 2013

Re: DLCOBJ not releasing a member



(You did not state what version / release of OS/400 or IBM i (i5/OS) this was running on.)

What is your CL program doing, in between the ALCOBJ and the corresponding DLCOBJ?

Sign-off, sign-on, and run the following experiment in an interactive job:

1. create a test member "A" in your QTXTSRC file, e.g. using SEU
2. issue "ALCOBJ ((library/QTXTSRC *FILE *EXCL A))"
3. issue DSPJOB and take option 12. Display locks
4. next to the line that shows the file level lock for QTXTSRC, type a
5=Display member locks
5. issue "ALCOBJ ((library/QTXTSRC *FILE *EXCL A))" again
6. issue DSPJOB option 12, then type a 5 next to the file "QTXTSRC"
* notice there are now "two" sets of locks for the MBR and DATA
7. issue "DLCOBJ ((library/QTXTSRC *FILE *EXCL A))
8. issue DSPJOB option 12, then type a 5 next to the file "QTXTSRC"
* notice there is now only one set of locks for the MBR and DATA
9. issue "DLCOBJ ((library/QTXTSRC *FILE *EXCL A))" again
10. issue DSPJOB, option 12 - there should be no more QTXTSRC locks

Do you know see how you might have somehow encountered a scenario that could have left a lock on that member?

For example, perhaps your program encountered an unmonitored error between the ALCOBJ and DLCOBJ and exited, without removing the lock...

Hope that helps,

Mark S. Waterbury

> On 12/13/2013 6:06 PM, Horn, Jim wrote:
Hi All

In a cl program, I am issuing the following command to lock a member in a
file. In case it matters the srctype of the file is TXT.


If the member is all ready locked, the the test fails and we have to
release the lock on the member before continuing. All well and good.

Later I issue
no monmsg after
no errors, nothing in the joblog, but the member remains locked.

Work with Member Locks
File . . . . . : QTXTSRC Type . . . . . : PHY
Library . . : INTQAT ASP device . . : *SYSBAS

Opt Member Job User Type Lock Status Share

The lock is not released until I sign off the workstation. As if I had
not issued the dlcobj command at all.

Any ideas?


Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact