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)

Paul


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of CRPence
Sent: Friday, December 05, 2014 3:49 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: Retrieve the library name from CPF2113

On 05-Dec-2014 14:16 -0600, Steinmetz, Paul wrote:
On 05-Dec-2014 13:45 -0600, Steinmetz, Paul wrote:
I've created a WRKWCH to monitor for CPF2113.
The watch CLP program will then
CALL TAATOOL CVTLIBLCK2 LIB(TPAULT1) OUTLIB(PAULS)

The result will be a PF loaded with all library locks, which will be
used for additional processing.

In the CL I need to retrieve the library name, TPAULT1, from the
CPF2113.
What command do I use to do this?

Message ID . . . : CPF2113 Severity . . . . : 40
Message type . . : Information
Date sent . . . : 12/05/14 Time sent . . . : 14:36:39
Message . : Cannot allocate library TPAULT1.

Need to RCVMSG from QSYSOPR, but allocated to another job

4100 - RCVMSG MSGQ(QSYSOPR) MSGDTA(&MSGLIB) MSGDTALEN(&MSGDTAL)
Message queue QSYSOPR is allocated to another job.


As I understand, the Watch Program (WCHPGM) is passed the requested information via the defined interface for the Watch Option of *MSGID; the data is passed within the storage for the Event Data parameter, via the storage defined as "Message replacement data" addressed via the "Offset to replacement data" [also\earlier within the Event Data].

<http://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/cl/strwch.htm>
_Start Watch_ (STRWCH)

--
Regards, Chuck
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.


This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 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].