CLRLIB2 CLEAR LIBRARY 2 TAALICU |
The Clear Library 2 command is like the system CLRLIB command, but
also clears objects that can cause CLRLIB to fail such as dependent
logical files in a different library, constraints specified by
ADDPFCST, receivers that have not been saved, and output queues with
entries. Some exceptions exist that may prevent a cleared library.
You must have *ALLOBJ authority to use CLRLIB2.
The intent of CLRLIB2 is that it should be used when you want to
force a library to be clear.
A typical command would be:
CLRLIB2 LIB(ABC)
The ABC library would be cleared.
Libraries can be protected using the PROLIB tool.
Exceptions
----------
Objects which are allocated will prevent a clear.
The DLTJRNRCV command specifies DLTOPT(*IGNINQMSG), but does not
request DLTOPT(*IGNEXITPGM) nor DLTOPT(*IGNTGTRCV).
Damaged objects may prevent a clear.
The command may not be used on a library owned by a system provided
user profile other than QPGMR.
Sequence of processing
----------------------
** An outfile of all objects in the library is created in QTEMP.
** The file is read by a sub program which:
-- Deletes any LFs read
-- Deletes any dependent LFs for physical files (they may
be in a different library).
-- Ends journaling for objects if a *JRN object is read
** Uses a sub program to delete *JRN objects
** The main program:
-- Deletes any *JRNRCV objects with DLTOPT(*IGNINQMSG)
-- Clears any spooled files in *OUTQ objects
-- Clears any jobs in *JOBQ objects
-- Deletes any remaining objects
If the library cannot be cleared (an object may be locked), a listing
is output of the errors and an escape message is issued.
CLRLIB2 escape messages you can monitor for
-------------------------------------------
TAA9896 The library could not be cleared.
Escape messages from based on functions will be re-sent.
CLRLIB2 Command parameters *CMD
--------------------------
LIB The library to be cleared.
CMD The command being run. The default is CLRLIB2.
This is intended as an internal use function to
allow the sharing of code with DLTLIB2.
Restrictions
------------
You must have *ALLOBJ authority to use CLRLIB2.
Prerequisites
-------------
The following TAA Tools must be on your system:
CHKALLOBJ Check *ALLOBJ special authority
CHKJOBCTL Check *JOBCTL special authority
CHKOBJ3 Check object 3
DLTDEPLGL Delete dependent logical
DLTOBJ2 Delete object 2
SNDCOMPMSG Send completion message
SNDESCINF Send escape information
SNDSTSMSG Send status message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
CLRLIB2 *CMD TAALICU QATTCMD
TAALICUC *PGM CLP TAALICUC QATTCL
TAALICUC2 *PGM CLP TAALICUC2 QATTCL
TAALICUC3 *PGM CLP TAALICUC3 QATTCL
TAALICUR *PGM RPG TAALICUR QATTRPG
|
Added to TAA Productivity tools April 15, 2009