Display Library (DSPLIB)
The Display Library (DSPLIB) command displays the contents of one or more specified libraries; that is, it displays a list of the names and attributes of the objects in each library. For all object types except user profiles (*USRPRF), the object is shown in the list of objects regardless of the authorizations you have for the object. For user profile (*USRPRF) objects, the object is shown in the list of objects only if you have some authority other than *EXCLUDE authority for the object.
This command can also be used to display a list of libraries from which individual libraries may be selected for a display of their objects. The display lists the name, type, auxiliary storage pool device name, and the descriptive text for each library. If more than one library is to be displayed, they are displayed one at a time.
From the display of a library's objects, the full or service options can be specified to request displays that show more specific information about the objects in the library.
Restrictions:
- You must have read (*READ) authority for each library specified to display the contents of the library.
- For all object types except user profiles (*USRPRF), the object is shown in the list of objects regardless of the authorizations you have for the object. You must have some authority other than *EXCLUDE authority for the object to display either the full or service attributes for the object. For user profile (*USRPRF) objects, the object is shown in the list of objects only if you have some authority other than *EXCLUDE authority for the object.
Notes:
- For printed output, the total-size field of the library includes the size of the objects in the library plus the size of the library object itself. If this value is followed by a plus (+) sign, objects in the library are locked, damaged or not authorized and the sizes of them have not been included in the total-size field. The plus sign indicates that the actual total of all objects is greater than the value displayed. If the library is QSYS, the user profiles for which you are not authorized are not shown in the list.
- If *ALL, *ALLUSR, *LIBL, or *USRLIBL is specified for the Library (LIB) parameter and output is printed, the contents of the libraries are printed. If one of these values is specified and the output is displayed, a list of the libraries is displayed from which individual libraries may be selected for further display.
Keyword |
Description |
Choices |
Notes |
LIB |
Library |
Single values: *LIBL, *USRLIBL, *CURLIB, *ALLUSR, *ALL Other values (up to 15 repetitions): Name |
Optional, Positional 1 |
ASPDEV |
ASP device |
Name, *, *ALLAVL, *CURASPGRP, *SYSBAS |
Optional |
OUTPUT |
Output |
*, *PRINT |
Optional, Positional 2 |
Library (LIB)
Specifies one or more libraries to be displayed or printed. If you do not have read (*READ) authority for a specified library, that library is not displayed. This parameter can be specified as a single value or as a list of one or more names.
Single values
- *LIBL
- All libraries in the library list for the current thread are displayed. If the ASP device (ASPDEV) parameter is specified when this value is used, ASPDEV(*) is the only valid value.
- *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 displayed. If there is no current library entry, only the libraries in the user portion of the library list are displayed. If the ASPDEV parameter is specified when this value is used, ASPDEV(*) is the only valid value.
- *CURLIB
- The current library for the current thread is displayed. If no library is specified as the current library for the thread, the QGPL library is displayed. If the ASPDEV parameter is specified when this value is used, ASPDEV(*) is the only valid value.
- *ALL
- All the libraries in the auxiliary storage pools (ASPs) defined by the ASPDEV parameter are displayed.
- *ALLUSR
- All user libraries and libraries containing user data and having names starting with the letter Q in the auxiliary storage pools (ASPs) defined by the ASPDEV parameter are displayed. User libraries are all libraries with names that do not begin with the letter Q 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 searched:
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.
Other values
- name
- Specify the name of one or more libraries whose objects are to be displayed. Up to 15 names can be specified.
ASP device (ASPDEV)
Specifies the auxiliary storage pool (ASP) device where storage is allocated for the library to be displayed. 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 this parameter is used when *CURLIB, *LIBL, or *USRLIBL is specified for the Library (LIB) parameter, ASPDEV(*) is the only valid value.
- *
- 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.
- *ALLAVL
- All available ASPs will be searched. This includes the system ASP (ASP 1), all defined basic user ASPs (ASPs 2-32), and all available primary and secondary ASPs (ASPs 33-255 with a status of 'Available').
- *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.
- *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.
- name
-
Specify the name of the primary or secondary ASP device 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.
Note: To specify a specific auxiliary storage pool (ASP) device name, you must have use (*USE) authority for each ASP device in the ASP group.
Output (OUTPUT)
Specifies whether the output from the command is displayed at the requesting work station or printed with the job's spooled output.
- *
- The output is displayed (if requested by an interactive job) or printed with the job's spooled output (if requested by a batch job).
- *PRINT
- The output is printed with the job's spooled output.
Example 1: Displaying a Library
DSPLIB LIB(QGPL)
The names, types, and basic descriptions of all the objects located in the QGPL library are either shown on the work station from which the command was submitted, or printed on the system printer if the command was run in a batch job.
Example 2: Displaying a Library in an Independent Auxiliary Storage Pool (ASP)
DSPLIB LIB(INVENTORY) ASPDEV(SALES)
This command displays the names, types, and basic descriptions of all the objects located in the INVENTORY library in the independent auxiliary storage pool (ASP) named SALES regardless of the authorizations you have to the objects in the library. The SALES ASP must have been activated (by varying on the ASP device) and have a status of 'Available'. The information is either shown on the work station from which the command was submitted, or printed on the system printer if the command was run in a batch job.
*ESCAPE Messages
- CPFB8ED
- Device description &1 not correct for operation.
- CPF210E
- Library &1 not available.
- CPF2110
- Library &1 not found.
- CPF2113
- Cannot allocate library &1.
- CPF2148
- Library marked *DELETED not found.
- CPF2150
- Object information function failed.
- CPF2176
- Library &1 damaged.
- CPF2179
- Cannot display library.
- CPF218C
- &1 not a primary or secondary ASP.
- CPF2182
- Not authorized to library &1.
- CPF9814
- Device &1 not found.
- CPF9825
- Not authorized to device &1.
- CPF9833
- *CURASPGRP or *ASPGRPPRI specified and thread has no ASP group.
- CPF9845
- Error occurred while opening file &1.
- CPF9846
- Error while processing file &1 in library &2.
- CPF9847
- Error occurred while closing file &1 in library &2.