The Retrieve Object Count command returns a count of the objects and
types found, the first object and library found, and the number of
libraries where objects were found.
A typical use of the command would be to determine the number of
objects that exist for a generic name, the library of the first
object and if all of the objects are in the same library.
DCL &FSTLIB *CHAR LEN(10)
DCL &OBJCNT *DEC LEN(7 0)
DCL &LIBCNT *DEC LEN(7 0)
.
RTVOBJCNT OBJ(xxxx*) FSTLIB(&FSTLIB) +
LIBCNT(&LIBCNT) OBJCNT(&OBJCNT)
IF (&LIBCNT *GT 1) DO /* More than 1 */
RTVOBJCNT escape messages you can monitor for
---------------------------------------------
CPF2123 No objects exist
Escape messages from based on functions will be re-sent.
Command parameters *CMD
------------------
OBJ The qualified file name of the object. A generic
name would normally be entered.
If a specific name (non-generic) is entered, the
object type may not be *ALL when *LIBL or *USRLIBL
is used (this is a DSPOBJD restriction).
*ALL may be specified to count all objects (if any).
If *ALL is used, only a specific library or *CURLIB
may be specified.
The library value defaults to *LIBL. *USRLIBL,
*CURLIB, *ALLUSR, or *ALL may also be entered.
OBJTYPE The standard object types are supported. *ALL is
the default.
FSTOBJ An optional return variable that will contain the
first object found. If specified, the variable must
be declared as *CHAR LEN(10).
FSTLIB An optional return variable that will contain the
library of the first object found. This can be
helpful if the library is not known. See also the
LIBCNT parameter. If specified, the variable must
be declared as *CHAR LEN(10).
FSTOBJTYPE An optional return variable that will contain the
object type of the first object found. If
specified, the variable must be declared as *CHAR
LEN(10).
LIBCNT An optional return variable that will contain a
count of the number of libraries where objects were
found. If specified, the variable must be declared
as *DEC LEN(7 0).
OBJCNT An optional return variable that will contain the
count of all the objects found. If specified, the
variable must be declared as *DEC LEN(7 0).
CNTPGM An optional return variable that will contain the
count of all the program objects found. If
specified, the variable must be declared as *DEC
LEN(7 0).
CNTPF An optional return variable that will contain the
count of all the physical file objects found. If
specified, the variable must be declared as *DEC
LEN(7 0).
CNTLF An optional return variable that will contain the
count of all the logical file objects found. If
specified, the variable must be declared as *DEC
LEN(7 0).
CNTDSPF An optional return variable that will contain the
count of all the display file objects found. If
specified, the variable must be declared as *DEC
LEN(7 0).
CNTPRTF An optional return variable that will contain the
count of all the printer file objects found. If
specified, the variable must be declared as *DEC
LEN(7 0).
CNTCMD An optional return variable that will contain the
count of all the command objects found. If
specified, the variable must be declared as *DEC
LEN(7 0).
CNTDTAARA An optional return variable that will contain the
count of all the data area objects found. If
specified, the variable must be declared as *DEC
LEN(7 0).
CNTJOBD An optional return variable that will contain the
count of all the job description objects found. If
specified, the variable must be declared as *DEC
LEN(7 0).
CNTMENU An optional return variable that will contain the
count of all the menu objects found. If specified,
the variable must be declared as *DEC LEN(7 0).
CNTOTHER An optional return variable that will contain the
count of all the other object types found that do
not have specific return variables. If specified,
the variable must be declared as *DEC LEN(7 0).
SIZE An optional return variable that will contain the
size of all the objects found. If specified, the
variable must be declared as *DEC LEN(15 0).
Note that the size returned does not include the
size of the library object.
Restrictions
------------
None.
Prerequisites
-------------
The following TAA Tools must be on your system:
CHKGENERC Check generic
SNDESCMSG Send escape message
SNDSTSMSG Send status message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
RTVOBJCNT *CMD TAAOBJS QATTCMD
TAAOBJSC *PGM CLP TAAOBJSC QATTCL
|