Work with Libraries (WRKLIB)
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, you must have use (*USE) authority to the command used by the operation, and the appropriate authority to the libraries on which the operation is to be performed.
Keyword |
Description |
Choices |
Notes |
LIB |
Library |
Qualifier list |
Optional, Positional 1 |
Qualifier 1: Library |
Generic name, name, *LIBL, *CURLIB, *USRLIBL, *ALLUSR, *ALL |
ASP |
ASP number |
1-32, *ALL |
Optional |
ASPDEV |
ASP device |
Name, *, *SYSBAS, *CURASPGRP |
Optional |
Library (LIB)
Specifies the libraries to be shown on the Work with Libraries display.
- *LIBL
- All libraries in the thread's library list are shown.
Note: A library can appear more than once in the list of libraries shown on the Work with Libraries display if that library is in the system portion or user portion of the library list and is also one of the product libraries or the current library for the thread.
- *USRLIBL
- If a current library entry exists in the library list for the current thread, the current library and the libraries in the user portion of the library list are shown. If there is no current library entry, only the libraries in the user portion of the library list are shown.
Note: A library can appear more than once in the list of libraries shown on the Work with Libraries display if that library is in the user portion of the library list and is also the current library for the thread.
- *CURLIB
- The current library for the thread is shown. If no library is specified as the current library for the thread, the QGPL library is shown.
- *ALL
- All the libraries in the auxiliary storage pools (ASPs) specified by the ASP number (ASP) parameter or the ASP device (ASPDEV) parameter 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 #DSULIB #SEULIB
#COBLIB #RPGLIB
#DFULIB #SDALIB
- Although 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 displayed:
QDSNX QRCLxxxxx QUSRIJS QUSRVxRxMx
QGPL QSRVAGT QUSRINFSKR
QGPL38 QSYS2 QUSRNOTES
QMGTC QSYS2xxxxx QUSROND
QMGTC2 QS36F QUSRPOSGS
QMPGDATA QUSER38 QUSRPOSSA
QMQMDATA QUSRADSM QUSRPYMSVR
QMQMPROC QUSRBRM QUSRRDARS
QPFRDATA QUSRDIRCL QUSRSYS
QRCL QUSRDIRDB QUSRVI
- '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.
- generic-name
- Specify the generic name of the libraries to be shown. A generic name is a character string that contains one or more characters followed by an asterisk (*). If a generic name is specified, all libraries that have names with the same prefix as the generic name are shown.
- name
- Specify the name of the library to be shown.
ASP number (ASP)
Specifies the auxiliary storage pool (ASP) for the libraries that should be shown 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 ASP device (ASPDEV) parameter value must be *.
- *ALL
- All ASPs defined by the value for the ASP device (ASPDEV) parameter will be searched.
- 1-32
- Specify the number of the system or basic user ASP to be searched. ASP 1 is the system ASP, which is always configured. Basic user ASPs are 2-32, and must designate an ASP that is configured on the system. For information on configuring an ASP, see the Backup and Recovery book, SC41-5304.
ASP device (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 (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 find 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 find 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 find 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.
- name
- Specify 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 configured basic user ASPs (ASPs 2-32) will not be searched.
WRKLIB LIB(QJ*) ASP(2)
This command allows you to work with a list of libraries in auxiliary storage pool (ASP) 2 that begin with the letters 'QJ'.
*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 group.
- CPFB8ED
- Device description &1 not correct for operation.