Work with Objects (WRKOBJ)
Where allowed to run: Interactive environments (*INTERACT *IPGM *IREXX *EXEC) Threadsafe: No |
Parameters Examples Error messages |
The Work with Objects (WRKOBJ) command shows a list of objects from one or more libraries.
The object name, object type, library name, object attribute, and short text description for the object are shown for each listed object. The data attributes and the actual data in the object are not shown. From this list, several object-oriented options can be performed.
Restrictions:
- Only the libraries to which you have use (*USE) authority will be searched.
- Only the objects to which you have some authority will be shown on the display.
- If you are authorized to the Database Security Administrator function of IBM i (QIBM_DB_SECADM), all libraries will be searched and all specified objects will be shown on the display.
- To perform operations on the objects, you must have *USE authority to the command used by the operation, and the appropriate authority to the objects on which the operation is to be performed.
Top |
Parameters
Keyword | Description | Choices | Notes |
---|---|---|---|
OBJ | Object | Qualified object name | Required, Positional 1 |
Qualifier 1: Object | Generic name, name, *ALL | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB, *USRLIBL, *ALLUSR, *ALL | ||
OBJTYPE | Object type | *ALL, *ALRTBL, *AUTL, *BNDDIR, *CFGL, *CHTFMT, *CLD, *CLS, *CMD, *CNNL, *COSD, *CRG, *CRQD, *CSI, *CSPMAP, *CSPTBL, *CTLD, *DEVD, *DOC, *DTAARA, *DTADCT, *DTAQ, *EDTD, *EXITRG, *FCT, *FILE, *FLR, *FNTTBL, *FNTRSC, *FORMDF, *FTR, *GSS, *IGCDCT, *IGCSRT, *IGCTBL, *IMGCLG, *IPXD, *JOBD, *JOBQ, *JOBSCD, *JRN, *JRNRCV, *LIB, *LIND, *LOCALE, *MEDDFN, *MENU, *MODD, *MODULE, *MSGF, *MSGQ, *MGTCOL, *M36, *M36CFG, *NODL, *NODGRP, *NTBD, *NWID, *NWSCFG, *NWSD, *OUTQ, *OVL, *PAGDFN, *PAGSEG, *PDFMAP, *PDG, *PGM, *PNLGRP, *PRDAVL, *PRDDFN, *PRDLOD, *PSFCFG, *QMFORM, *QMQRY, *QRYDFN, *RCT, *S36, *SBSD, *SCHIDX, *SPADCT, *SQLPKG, *SQLUDT, *SQLXSR, *SRVPGM, *SVRSTG, *SSND, *TBL, *TIMZON, *USRIDX, *USRPRF, *USRQ, *USRSPC, *VLDL, *WSCST | Optional, Positional 2 |
Top |
Object (OBJ)
Specifies the objects to be shown on the Work with Objects display.
This is a required parameter.
Qualifier 1: Object
- *ALL
- All objects of the object types specified for the Object type (OBJTYPE) parameter.
- generic-name
- Specify the generic name of the object 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 objects that have names with the same prefix as the generic name are shown.
- name
- Specify the name of the object to be 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 thread is searched. If no library is specified as the current library for the thread, the QGPL library is searched.
- *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 searched. If there is no current library entry, only the libraries in the user portion of the library list 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 QWQCENT QMGTC QSYS2xxxxx QUSRNOTES QWQREPOS
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.
- *ALL
- All libraries in the system, including QSYS, are searched.
- name
- Specify the name of the library to be searched.
Top |
Object type (OBJTYPE)
Specifies the object type for objects to be shown.
- *ALL
- All objects are shown that have an object name that matches the value specified for the Object (OBJ) parameter.
- object-type
- Specify the object type for objects to be listed, such as command (*CMD), file (*FILE), or program (*PGM). To see a complete list of object types when prompting this command, position the cursor on the field for this parameter and press F4 (Prompt).
Top |
Examples
WRKOBJ OBJ(X/PAY*) OBJTYPE(*ALL)
This command displays the Work with Objects panel, showing all objects for which you have authority whose names begin with the letters 'PAY' and are located in library X.
Top |
Error messages
*ESCAPE Messages
- CPF9809
- Library &1 cannot be accessed.
- CPF9810
- Library &1 not found.
- CPF9820
- Not authorized to use library &1.
Top |