Work with Module (WRKMOD)
Where allowed to run: Interactive environments (*INTERACT *IPGM *IREXX *EXEC) Threadsafe: No |
Parameters Examples Error messages |
The Work with Modules (WRKMOD) command allows you to display and work with a list of modules from one or more libraries.
Restrictions:
- Only the libraries to which you have use (*USE) authority are searched.
- Only the modules to which you have read (*READ) authority are shown on the display.
- To perform operations on the modules, you must have *USE authority to the command used by the operation, and the appropriate authority to the modules on which the operation is to be performed.
Top |
Parameters
Keyword | Description | Choices | Notes |
---|---|---|---|
MODULE | Module | Qualified object name | Required, Positional 1 |
Qualifier 1: Module | Generic name, name, *ALL | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB, *USRLIBL, *ALLUSR, *ALL | ||
MODATR | Module attribute | *ALL, CBLLE, CLE, CLLE, CPPLE, RPGLE | Optional, Positional 2 |
Top |
Module (MODULE)
Specifies how to search for modules to be placed in the list. All modules with names that correspond to the specified parameter value, and for which the user has authority, are shown.
This is a required parameter.
Qualifier 1: Module
- *ALL
- All modules in the libraries identified in the library qualifier are shown (except those libraries for which the user does not have authority).
- generic-name
- Specify the generic name of the module. A generic name is a character string of one or more characters followed by an asterisk (*); for example, ABC*. If a generic name is specified, then all modules with names that begin with the generic name, and for which the user has authority, are shown. If an asterisk is not included with the generic (prefix) name, the system assumes it to be the complete module name.
- name
- Specify the name of the module shown.
Qualifier 2: Library
- *LIBL
- All libraries in the library list for the current thread are searched. All objects in these libraries with the specified object name are shown.
- *CURLIB
- The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
- *USRLIBL
- Only the libraries in the user portion of the job's library list are searched.
- *ALL
- All libraries in the system portion of the job's library list, including QSYS, are searched.
- *ALLUSR
- All user libraries are searched. All libraries with names that do not begin with the letter Q are searched 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 QUSRDIRDB QUSRVI QGPL QSRVAGT QUSRIJS QUSRVxRxMx QGPL38 QSYS2 QUSRINFSKR QMGTC QSYS2xxxxx QUSRNOTES QMGTC2 QS36F QUSROND QMPGDATA QUSER38 QUSRPOSGS QMQMDATA QUSRADSM QUSRPOSSA QMQMPROC QUSRBRM QUSRPYMSVR QPFRDATA QUSRDIRCF QUSRRDARS QRCL QUSRDIRCL QUSRSYS
- '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.
- name
- Specify the name of the library to be searched.
Top |
Module attribute (MODATR)
Specifies that a list of modules with the selected attribute is shown.
- *ALL
- Modules are shown regardless of the attribute associated with the module.
- CBLLE
- Modules with the CBL attribute (ILE COBOL modules) are shown.
- CLE
- Modules with the C attribute (ILE C modules) are shown.
- CLLE
- Modules with the CL attributes (ILE CL modules) are shown.
- CPPLE
- Modules with the CPPLE attribute (ILE C++ modules) are shown.
- RPGLE
- Modules with the RPG attribute (ILE RPG modules) are shown.
Top |
Examples
WRKMOD MODULE(MYLIB/*ALL)
This command lists all the modules to which the user has authority that are stored in library MYLIB.
Top |
Error messages
*ESCAPE Messages
- CPF9809
- Library &1 cannot be accessed.
- CPF9820
- Not authorized to use library &1.
Top |