The Work Object 2 command provides more options than the system
WRKOBJ command. In addition to the same options as WRKOBJ, WRKOBJ2
supports options for Change/Work, DSPxxx, DSPOBJD2, and MOVOBJ.
WRKOBJ2 provides specific commands for options such as CHGJOBD and
DSPJOBD if a JOBD object is being displayed. A search pattern may be
specified.
For data base files, the WRKF2 command is used for Change/Work and
DSPF2 for DSPxxx.
A typical command would be:
WRKOBJ2 ABCD
Any objects beginning with a name of ABCD would be on the library
list would displayed in a subfile display. Options may then be taken
for further information or change.
A shorthand command 'W' exists, so that the command could be entered
as:
W ABCD
Search pattern
--------------
A search pattern may be entered to provide more flexibility in
finding objects. Three pattern characters may be included:
_ Allows any character to be selected
* Allows generic capability (must be the last character)
% Allows a scan capability (search characters must follow)
Rules
-----
- Combinations of _ and * may exist or _ and *.
- No embedded blanks may exist.
- Using % requires quotes around the search pattern.
- The characters in the pattern are folded to upper case.
Examples
--------
ABC__FG Finds ABCDEFG, ABCDDFG, ABCXXFG etc
ABC* Finds any ABC value (generic)
A_C* Finds ABC, AXCX, AYC etc
AB%12 Finds AB12, ABXXX12, ABX12Y etc
A_C%XYZ Finds ABCXYZ, AWXYZDD, AMCXYZF etc
%123 Finds A123, ABC123, ABCDEFG123 etc
_XY Finds AXY, BXY etc
Performance
-----------
It is best to begin the search pattern with non-special
characters. The first pattern character determines the length
of the generic request that can be passed to the API. This
can limit the number of object names that must be searched for
the pattern. You can also limit the pattern searching by
specifying a library and/or an object type.
Assume you specify:
WRKOBJ2 OBJ(*ALL/*PTN) OBJTYPE(*ALL)
PATTERN(%ABC)
This would require every object on the system to be searched
for the letters ABC.
A better solution is to use letters before the search request
and an object type such as:
WRKOBJ2 OBJ(*ALL/*PTN) OBJTYPE(*PGM)
PATTERN(GL%ABC)
WRKOBJ2 escape messages you can monitor for
-------------------------------------------
None. Escape messages from based on functions will be re-sent.
WRKOBJ2 Command parameters *CMD
--------------------------
OBJ The qualified name of the object. A generic name or
*ALL may be entered. *PTN may be entered to specify
that the PATTERN parameter describes the pattern to
be searched for.
The library value defaults to *LIBL. A specific
library or *CURLIB, *USRLIBL, *ALLUSR, or *ALL may
be entered.
OBJTYPE The object type to be worked with. *ALL is the
default. Use the prompter for the list of supported
types.
OBJATR The object attribute to be worked with. The default
is *ALL for all attributes.
A value such as RPG or DSPF could be entered. There
is no check made that the characters entered are a
valid attribute nor that the value makes sense if an
object type is entered. An object attribute may be
entered with or without a specific object type.
PATTERN The pattern to be searched for. Special characters
may be included as:
_ Allows any character to be selected
* Allows generic capability
% Allows a scan capability
Typical search patterns would be:
AB_D Finds ABCD, ABXD
ABC* Finds ABC, ABCD
A_C* Finds ABC, AXCD, AYCDEF
AB%12 Find AB12, ABC12, AB123
A__D%34 Finds ABCD34, AXYDZ34, AMMD134
See the previous discussion for rules and additional
examples.
W Command parameters *CMD
--------------------
OBJ The qualified name of the object. A generic name or
*ALL may be entered. The library value defaults to
*LIBL. *PTN may be entered to specify that the
PATTERN parameter describes the pattern to be
searched for.
The library value defaults to *LIBL. A specific
library or *CURLIB, *USRLIBL, *ALLUSR, or *ALL may
be entered.
OBJTYPE The object type to be worked with. *ALL is the
default. Use the prompter for the list of supported
types.
OBJATR The object attribute to be worked with. The default
is *ALL for all attributes.
A value such as RPG or DSPF could be entered. There
is no check made that the characters entered are a
valid attribute nor that the value makes sense if an
object type is entered. An object attribute may be
entered with or without a specific object type.
PATTERN The pattern to be searched for. Special characters
may be included as:
_ Allows any character to be selected
* Allows generic capability
% Allows a scan capability
Typical search patterns would be:
AB_D Finds ABCD, ABXD
ABC* Finds ABC, ABCD
A_C* Finds ABC, AXCD, AYCDEF
AB%12 Find AB12, ABC12, AB123
A__D%34 Finds ABCD34, AXYDZ34, AMMD134
See the previous discussion for rules and additional
examples.
Restrictions
------------
None.
Prerequisites
-------------
The following TAA Tools must be on your system:
ADJVAR Adjust variable
CHGUSRSPC Change user space
CHKGENERC Check generic
DLTOBJ Delete object
DSPERRMSG Display error message
DSPOBJD2 Display object description 2
DSPDTAQ Display data queue
and other TAA DSP commands
EDTDTAARA Edit data area
HLRMVMSG HLL Remove message
PMTOPR Prompt operator
SNDESCINF Send escape information
SNDESCMSG Send escape message
WRKF2 Work file 2
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
WRKOBJ2 *CMD TAAOBLN QATTCMD
TAAOBLNC *PGM CLP TAAOBLNC QATTCL
TAAOBLNC11 *PGM CLP TAAOBLNC11 QATTCL
TAAOBLNC12 *PGM CLP TAAOBLNC12 QATTCL
TAAOBLNC13 *PGM CLP TAAOBLNC13 QATTCL
TAAOBLNR *PGM RPG TAAOBLNR QATTRPG
TAAOBLND *FILE DSPF TAAOBLND QATTDDS
The W command is created from CRTDUPOBJ of WRKOBJ2.
Structure
---------
WRKOBJ2 Cmd
TAAOBLNC CL pgm
TAAOBLNR RPG Pgm
TAAOBLND DSPF
TAAOBLNC11 CL pgm - Does options for simple commands
TAAOBLNC12 CL pgm - Does options for DSPxxx
TAAOBLNC13 CL pgm - Does options for Change/Work
|