On 05-Dec-2014 15:17 -0600, Steinmetz, Paul wrote:
I have my WRKWCH working for CPF2113, Cannot allocate library
I have now automated the process of finding the locks on a library,
ending those jobs.
On our R&D LPAR, we have AJS (Advanced Job Scheduler) that deletes
all 20+ libraries for an environment.
Following our nightly full Production save, we then refresh these
libraries from Production.
Periodically, not all processes are ended, thus resulting in library
locks, thus the DLTLIB job fails.
The WRKWCH program outputs all the lock to a file
CVTLIBLCK2 LIB(&MSGLIB) OUTLIB(PAULS) /* t */
Reading through the file
ENDJOB JOB(&OLJNBR/&OLUSER/&OLJNAM) OPTION(*IMMED) +
/* RETRY DLTLIB THAT WAS ORIGINALLY LOCKED */
DLYJOB DLY(5)
DLTLIB LIB(&MSGLIB)
Seems odd to design\use a reactive by-notification approach that is
implemented outside of the procedure that might fail to effect a DLTLIB;
implemented as a Watch Program (WCHPGM) via Start Watch (STRWCH).
Perhaps that /procedure/ is scripted CL instead of CL code for which
conditional logic is unavailable.? Seems like the procedure doing the
DLTLIB requests could be coded to _react directly to_ and rectify any
failing situation; the recovery processing performed inline to the
delete request proccessing could even use\invoke the same logic as
described being coded in the WCHPGM of the STRWCH.?
FWiW If I had a need for a Delete Library request to operate so
aggressively as to [blindly or at least per unattended algorithm]
perofrm ENDJBO requests against any jobs holding the locks, I would
probably write a custom command that calls a program to perform the
actions according to a requested level of aggressiveness; perhaps
including consideration for the value of Library Locking Level
(QLIBLCKLVL) and both the System Library List (QSYSLIBL) and User
Library List (QUSRLIBL) if DLTLIB was mandatory, or even the option to
allow for Clear Library (CLRLIB) instead. Noting however, that even
review of those system values ignores the possibility that active
subsystem monitor jobs may have the library assigned for their Subsystem
Library (SYSLIBLE); in any case, End Subsystem (ENDSBS) might be
required instead of ENDJOB, and for any system jobs an IPL after
removing the library from QSYSLIBL and\or changing QLIBLCKLVL would be
required for DLTLIB but not CLRLIB.
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.