WRKLIB (Work with Libraries)
Purpose
The Work with Libraries (WRKLIB) command shows a list of libraries and allows you to copy, delete, display, print, save, restore, change, and clear specified libraries.>
Restrictions
- Only the libraries to which you have some authority will be shown on the display.
- To perform operations on the libraries, have USE authority to the command used by the operation, and the appropriate authority to the libraries on which the operation is to be performed.
Note: Do not precede an entry with an asterisk unless that entry is a "special value" that is shown (on the display itself or in the help information) with an asterisk. >
Required Parameters
- LIB
- Specifies the names of the libraries to be listed on the Work with Libraries display.> If you do not have read authority for a specified library, that library is not listed.
.
*LIBL: All libraries in the thread's library list are displayed. All objects in these libraries with the specified object name are shown.>
*CURLIB: The current library for the thread is displayed. If no library is specified as the current library for the thread, the QGPL library is used.>
*USRLIBL: Only the libraries listed in the user portion of the thread's library list are shown.>
*ALLUSR: All user libraries are displayed. All libraries with names that do not begin with the letter Q are displayed except for the following:
#CGULIB
#COBLIB
#DFULIB
#DSULIB#RPGLIB
#SDALIB
#SEULIBAlthough the following Qxxx libraries are provided by IBM, they typically contain user data that changes frequently. Therefore, these libraries are considered user libraries and are also searched:
QDSNX
QGPL
QGPL38
QMPGDATA
QMQMDATA
QMQMPROC
QPFRDATA
QRCL
QRCLxxxxx
QSYS2QSYS2xxxxx
QS36F
QUSER38
QUSRADSM
QUSRBRM
QUSRDIRCL
QUSRDIRDB
QUSRIJS
QUSRINFSKR
QUSRNOTESQUSROND
QUSRPOSGS
QUSRPOSSA
QUSRPYMSVR
QUSRRDARS
QUSRSYS
QUSRVI
QUSRVxRxMxNotes:
- 'xxxxx' is the number of a primary auxiliary storage pool (ASP).
- A different library name, in the format QUSRVxRxMx, can be created by the user for each previous release supported by IBM to contain any user commands to be compiled in a CL program for the previous release. For the QUSRVxRxMx user library, VxRxMx is the version, release, and modification level of a previous release that IBM continues to support. >
*ALL: All the libraries in the auxiliary storage pools (ASPs) specified by the ASP number prompt (ASP parameter) or ASP device prompt (ASPDEV parameter) are displayed.>
library-name: Specify the name of the library to be displayed.>
generic*-library-name: Specify the generic name of the libraries. A generic name is a character string that contains one or more characters followed by an asterisk (*), for example, ABC*.>
Optional Parameters
- ASP
- Specifies the auxiliary storage pool (ASP) for the libraries that should be listed on the Work with Libraries display. This parameter is ignored when a value of *LIBL, *CURLIB or *USRLIBL is entered for the library parameter. If a number is specified for this parameter, the ASPDEV parameter value must be *.>
*ALL: *ALL will include all the libraries in the thread's library name space depending of the value defined in the ASP device (ASPDEV parameter).>
auxiliary-storage-pool-number: Valid values are the numbers 1 through 32, which must designate an ASP that is configured on the system. ASP 1 is the system ASP. The user ASPs are 2-32. For information on configuring an ASP, see the Backup and Recovery book, SC41-5304.>
- ASPDEV
- Specifies the auxiliary storage pool (ASP) device name where storage for the library being displayed is allocated. If the library is in an ASP that is not part of the thread's library name space, this parameter must be specified to ensure the correct library is displayed. If a number is specified for the ASP number prompt (ASP parameter), the ASPDEV parameter value must be *.
*: The ASPs that are currently part of the thread's library name space will be searched to locate the library. This includes the system ASP (ASP 1), all defined basic user ASPs (ASPs 2-32), and, if the thread has an ASP group, the primary and secondary ASPs in the thread's ASP group.
*SYSBAS: The system ASP (ASP 1) and all defined basic user ASPs (ASPs 2-32) will be searched to locate the library. No primary or secondary ASPs will be searched, even if the thread has an ASP group.
*CURASPGRP: If the thread has an ASP group, the primary and secondary ASPs in the thread's ASP group will be searched to locate the library. The system ASP (ASP 1) and defined basic user ASPs (ASPs 2-32) will not be searched. If no ASP group is associated with the thread an error will be issued.
auxiliary-storage-pool-device-name: The device name of the primary or secondary ASP to be searched. The primary or secondary ASP must have been activated (by varying on the ASP device) and have a status of 'Available'. The system ASP (ASP 1) and defined basic user ASPs (ASPs 2-32) will not be searched.>
Example for WRKLIB
WRKLIB LIB(QJ*) ASP(2)This command allows you to work with a list of libraries in auxiliary storage pool 2 that begin with the prefix letters QJ.
Error messages for WRKLIB
*ESCAPE Messages
- CPF218C
- &1 not a primary or secondary ASP.>
- CPF2302
- Device &1 not found in ASP group &2.>
- CPF9809
- Library &1 cannot be accessed.
- CPF9814
- Device &1 not found.>
- CPF9820
- Not authorized to use library &1.
- CPF9825
- Not authorized to device &1.>
- CPF9833
- *CURASPGRP or *ASPGRPPRI specified and thread has no ASP grup.>
- CPFB8ED
- Device description &1 not correct for operation.>