Command reference / library

CLRLIB

Clear Library

Deletes all objects in the specified library for which you have object existence (*OBJEXIST) authority. The library itself is not deleted. Objects you lack *OBJEXIST authority for, and objects in use (locked by another thread or job), remain in the library.

Allowed environments: *ALL. Positional parameters: 1.

Restrictions

Parameters

LIB Library

Specifies the library to be cleared. Objects for which you lack *OBJEXIST authority remain. If QGPL is specified or defaulted through *CURLIB, inquiry message CPA2129 asks you to verify the clear.

Type
*NAME
Required
Yes
Length
10
Case
Uppercase

Suggested / special values: *CURLIB

*CURLIB
The current library for the thread is cleared. If the thread has no current library, QGPL is cleared.

ASPDEV ASP device

Specifies the auxiliary storage pool (ASP) device where storage for the library is allocated. Required if the library is not part of the thread's library name space. With *CURLIB for LIB, only ASPDEV(*) is valid.

Type
*NAME
Required
No
Default
*
Length
10
Case
Uppercase

Suggested / special values: *, *CURASPGRP, *SYSBAS

*
Searches the ASPs in the thread's library name space: ASP 1, ASPs 2-32, and, if the thread has an ASP group, its primary and secondary ASPs.
*CURASPGRP
Searches the primary and secondary ASPs in the thread's ASP group. ASP 1 and ASPs 2-32 are not searched.
*SYSBAS
Searches ASP 1 and all basic user ASPs (2-32). No primary or secondary ASPs are searched, even if the thread has an ASP group.

Examples

CLRLIB LIB(A)

Deletes all objects in library A that are not in use and for which you have *OBJEXIST authority.

IBM command documentation

Generated from os/cl/catalog/CLRLIB.json and os/cl/help/CLRLIB.json.