Work with Libraries Using PDM (WRKLIBPDM)

Where allowed to run: Interactive environments (*INTERACT *IPGM *IREXX *EXEC)
Threadsafe: No
Parameters
Examples
Error messages

The Work with Libraries Using PDM (WRKLIBPDM) command enables you to work with a single library or multiple libraries. Using this command, you can bypass the Programming Development Manager (PDM) menu and the Specify Libraries to Work With display.

Top

Parameters

Keyword Description Choices Notes
LIB Library Character value, *PRV, *LIBL, *USRLIBL, *ALL, *ALLUSR, *CURLIB Optional, Positional 1
ASP ASP number 1-32, *ALL Optional
ASPDEV ASP device Name, *, *SYSBAS, *CURASPGRP Optional
Top

Library (LIB)

Specifies the libraries to work with.

*PRV
Work with the same library or libraries that you worked with in your previous WRKLIBPDM session.
*LIBL
Work with all of the libraries in the job's library list.
*USRLIBL
Work with all libraries in the user portion of the job's library list.
*ALL
Work with all libraries on the system, including QSYS and QTEMP.
*ALLUSR
Work with all non-system libraries, including all user libraries. The libraries are listed alphabetically by library name.
*CURLIB
Work with the current library for the job. If you have not specified a current library for the job, library QGPL is assumed.
generic-name
Specify the generic name of the libraries to work with.

The generic name can be in one of the following formats:

ABC*
Displays a list of all libraries that begin with the characters ABC. For example, ABC, ABCD, or ABCTEST.
*ABC
Displays a list of all libraries ending with the characters ABC. For example, ABC, DABC, or TESTABC.
*B*
Displays a list of all libraries that have the character B anywhere in the name. For example, B, BALL, ABCD.
A*C
Displays a list of all libraries that begin with the character A and end with the character C. For example, AC, ABC, or AZZZC.
"a*"
Displays a list of all libraries with quoted names that start with the letter a. For example, "a", "aB", "aD".
**ALL
Displays a list of all libraries ending with ALL. For example, ALL, BALL, or TESTALL. The double asterisk is needed in this case, since *ALL is defined as the special value to display a list of all libraries.
name
Specify the name of the single library to work with.
Top

ASP number (LIB)

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.
Top

ASP device (LIB)

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.
Top

Examples

Example 1: Work with Libraries in Job Library List

WRKLIBPDM   LIB('*LIBL')

This command allows you to work with all of the libraries that are in the library list of the current job. The libraries are listed in the same order as the library list.

Example 2: Work with a Generic Set of Libraries

WRKLIBPDM   LIB('*PAY*')

This command allows you to work with the subset of libraries that contain the letters PAY in the library name. The libraries are listed in alphabetical order.

Top

Error messages

*ESCAPE Messages

PDM0055
Error while processing the &1 command.
Top