Where allowed to run: All environments (*ALL) Threadsafe: Conditional |
Parameters Examples Error messages |
The Delete Library (DLTLIB) command deletes a specified library from the system after all objects in the library have been deleted. If a library that is deleted contains objects, this command first deletes all of the objects and then deletes the library.
If you do not have the authority to delete every object in the library, only those for which you do have the authority are deleted. In this case, the library and all the other objects in the library remain unchanged. If any object in the library is in use (locked by another thread or job), the object cannot be deleted.
If a library has been damaged, you should not delete it without first trying to resolve the damage. In most cases, the damage can be resolved by starting the initial program load (IPL) sequence to rebuild a user library (including the QGPL library). Then, if the library is still damaged, it should be deleted. Either a saved version of the library can be restored in its place or the library can be recreated.
Restrictions:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
LIB | Library | Name | Required, Positional 1 |
ASPDEV | ASP device | Name, *, *CURASPGRP, *SYSBAS | Optional |
Top |
Specifies the library to be deleted.
This is a required parameter.
Top |
Specifies the auxiliary storage pool (ASP) device where storage is allocated for the library to be deleted. If the library is not part of the thread's library name space, this parameter must be specified to ensure the correct library is the target of the delete library operation.
Note: To specify a specific auxiliary storage pool (ASP) device name, you must have *USE authority for each ASP device in the ASP group.
Top |
Example 1: Deleting a Library
DLTLIB LIB(W)
This command deletes library W after all of its objects have been deleted. If library W contains objects and you have the authority to delete all of those objects, library W and all of the objects are deleted. If you do not have authority to delete all of the objects, only those for which you have authority are deleted and the library is not deleted.
Example 2: Deleting a Library in an Independent Auxiliary Storage Pool (ASP)
DLTLIB LIB(INVENTORY) ASPDEV(SALES)
This command deletes library INVENTORY in the independent auxiliary storage pool (ASP) named SALES after all of its objects have been deleted. The SALES ASP must have been activated (by varying on the ASP device) and have a status of 'Available'. If library INVENTORY contains objects and you have the authority to delete all of those objects, library INVENTORY and all of the objects are deleted. If you do not have authority to delete all of the objects, only those for which you have authority are deleted and the library is not deleted.
Top |
*ESCAPE Messages
Top |