WRKMOD (Work with Modules)
Purpose
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 authority are searched.
- Only the modules to which you have *READ authority are shown on the display.
- To perform operations on the modules, 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.
Required Parameters
- 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.
If no library qualifier is specified, *LIBL is assumed and all libraries in the job's library list are searched for the modules.
The name of the modules can be qualified by one of the following library values:
*LIBL: All libraries in the job's library list 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, including QSYS, are searched.
library-name: Specify the name of the library to be searched.
*ALL: All modules in the libraries identified in the library qualifier are shown (except those libraries for which the user does not have authority).
module-name: Specify the name of the module shown.
generic*-module-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. See generic names for additional information.
Optional Parameters
- 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 (CBL) are shown.
CLE: Modules with the C attribute (C) are shown.
CLLE: Modules with the CL attribute (CL) are shown.
RPGLE: Modules with the RPG attribute (RPG) are shown.
Example for WRKMOD
WRKMOD MODULE(MYLIB/*ALL)This command lists all the modules to which the user has authority that are stored in library MYLIB.
Error messages for WRKMOD
*ESCAPE Messages
- CPF9809
- Library &1 cannot be accessed.
- CPF9820
- Not authorized to use library &1.