Command reference / library
DLTLIB
Delete Library
Deletes a library after first deleting all of the objects in it. If you lack authority to delete some objects, only the objects you are authorized to delete are removed, and the library and all other objects remain unchanged. Any object in use by another thread or job cannot be deleted. A damaged library should be repaired first, often by an IPL that rebuilds user libraries, and only then deleted or replaced with a restored or recreated copy. If the library is journaled, the deletion is recorded in the journal.
Allowed environments: *ALL.
Positional parameters: 1.
Restrictions
- Requires *USE and *OBJEXIST authority on the library and *OBJEXIST authority on every object in it. Without *OBJEXIST on the library, nothing is deleted.
- A library in the current thread's library list cannot be deleted.
- A library in the library list of any active primary thread cannot be deleted when the QLIBLCKLVL system value locks libraries in the list.
- IBM system libraries cannot be deleted. Message CPD2165 is sent if one is specified.
- If the QDOC library is deleted, it is created again at the next IPL.
- Conditionally threadsafe. In multithreaded jobs it is not threadsafe for distributed files, which fail for distributed files that use *SNA relational databases.
Parameters
LIB
Library
Specifies the library to delete. This parameter is required.
ASPDEV
ASP device
Selects the ASPs searched for the library to delete. A named ASP must be varied on and Available.
Suggested / special values:
*, *CURASPGRP, *SYSBAS
*- Search the thread's library name space: system and basic user ASPs, plus its ASP group.
*CURASPGRP- Search only the primary and secondary ASPs of the thread's ASP group.
*SYSBAS- Search system ASP 1 and basic user ASPs 2 through 32 only.
name- Search only the named primary or secondary ASP. *USE authority is required for every device in the group.
Examples
DLTLIB LIB(W)
Deletes library W after all of its objects are deleted. If you lack authority for some objects, only those you are authorized for are deleted, and the library is not deleted.
DLTLIB LIB(INVENTORY) ASPDEV(SALES)
Deletes library INVENTORY in the independent ASP named SALES after its objects are deleted. The SALES ASP must be varied on and have a status of Available.
Generated from os/cl/catalog/DLTLIB.json and os/cl/help/DLTLIB.json.