Command reference / library

WRKLIB

Work with Libraries

Shows a list of libraries and lets you copy, delete, display, print, save, restore, change, and clear the specified libraries.

Allowed environments: *INTERACT, *IPGM, *IREXX, *EXEC. Positional parameters: 1.

Restrictions

Parameters

LIB Library

Specifies the libraries to be shown on the Work with Libraries display. A library can appear more than once if it is in both the system and user portions of the library list and is also a product library or the current library.

Type
*QUAL
Required
No
Case
Uppercase
*LIBL
All libraries in the thread's library list are shown.
*USRLIBL
If a current library entry exists, the current library and the user portion of the library list are shown; otherwise only the user portion is shown.
*CURLIB
The thread's current library is shown; QGPL if no current library is set.
*ALL
All libraries in the ASPs specified by the ASP or ASPDEV parameters are shown.
*ALLUSR
All user libraries are shown: names not beginning with Q, plus certain IBM-supplied Q libraries that typically hold frequently changing user data.
Qualified parts (object, then library; write LIBRARY/OBJECT)

Library Library

Type
*GENERIC
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB, *USRLIBL, *ALLUSR, *ALL

ASP ASP number

Specifies the auxiliary storage pool (ASP) containing the libraries to show. It is ignored when LIB is *LIBL, *CURLIB or *USRLIBL. If a number is given, ASPDEV must be *.

Type
*UINT2
Required
No
Default
*ALL
Range
1 to 32
Case
Uppercase

Suggested / special values: *ALL

*ALL
All ASPs defined by the ASPDEV parameter are searched.

ASPDEV ASP device

Specifies the ASP device name where the library being displayed is allocated. Specify it when the library is in an ASP outside the thread's library name space. If ASP is a number, ASPDEV must be *.

Type
*NAME
Required
No
Default
*
Length
10
Case
Uppercase

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

*
The ASPs in the thread's library name space are searched, including ASP 1, ASPs 2-32, and the thread's ASP group if it has one.
*SYSBAS
The system ASP (ASP 1) and all defined basic user ASPs (2-32) are searched; primary and secondary ASPs are not.
*CURASPGRP
The primary and secondary ASPs in the thread's ASP group are searched; an error is issued if the thread has no ASP group.

Examples

WRKLIB LIB(QJ*) ASP(2)

Lets you work with the libraries in ASP 2 whose names begin with QJ.

IBM command documentation

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