TAA Tools
CVTLIBCNT       CONVERT LIBRARY COUNT                  TAALICE

The  Convert Library  Count  command adds  one  record to  the  LIBCNTP
outfile  which is  a summary of  the objects  in a  single library.   A
list  of up to 300  libraries may be named  or the special values *ALL,
*NONSYS, or *ALLUSR.   The output record  includes counts and sizes  of
typical object types  as well as an estimate of  the number of internal
objects that will be required for a save.

An 'omit list' of libraries may also be specified.

The  model  file  is  TAALICEP with  a  format  name  of  LIBCNTR.   An
optional outfile  may be specified  for the  LIBOBJP file.   The  model
file is TAALICEQ with a format name of LIBOBJR.

The user must be authorized to the TAADSPADP authorization list.

A typical command would be:

             CVTLIBCNT     LIB(xxx) OUTLIB(QTEMP)

The  library specified  would be  summarized  and one  record would  be
written  to  the LIBCNTP  file  in  QTEMP.   The  record  would contain
information about  the  library  including  the  size  of  the  library
object in  QSYS, the number  of objects, total  size of the  library, a
count  and size of  program objects,  physical data files,  source data
files, logical files, etc.

The   LBINTC  (internal  object  count)  in  LIBCNTP  will  contain  an
estimate of the  number of internal objects  that will be saved  if the
library is  saved with  ACCPTH(*YES).  This  count is based  on various
factors, but can only be an estimate.  See the later discussion.

The  command  may  be  run for  multiple  libraries  with  each library
adding a record  to the LIBCNTP  file so that  an analysis program  can
be run.

Optional LIBOBJP outfile
------------------------

The  OUTLIB2  parameter defaults  to  *NONE  meaning that  the  LIBOBJP
outfile will  not be created.   If a library is  specified, the outfile
will be created  with one  record per  object.  It  will contain  basic
object information  and  the estimated  internal object  count for  the
object.

An  intended use of  the file is  for estimating internal  object count
requirements.

Internal count technique
------------------------

Most  object types (such as programs)  are simple objects and have only
a single internal object.

Data base  objects are made  up of  several sub objects  many of  which
are optional.   Some of these can  be easily counted.   Others can only
be  estimated.   The complete  details of 'what  counts' is  beyond the
scope of this document.

The following technique is used.

  **   Each data base object (physical or logical) counts 1.

  **   Each physical file member counts 1.

  **   Each keyed access path counts 1 per physical file member.

  **   It is assumed that a Physical  File format is not shared so  for
       each Physical file, count 1 for the Format sub object.

  **   Each logical file member counts 1.

  **   A logical file  may share a format  of a Physical file.   If so,
       there  is a  'sharing directory' per  physical file  that counts
       1.  If a  new format is  described, it counts  1 for the  Format
       sub object.  Estimate by counting 1 per logical file.

  **   There  are other  'sharing  directories'  such  as at  the  File
       level,  for   the  access  paths,  and  at   the  member  level.
       Estimate  by counting 1  for each logical file  member.  This is
       an estimate  because some  access paths will  be shared,  others
       not, etc.

  **   Variable length  records may cause additional  sub objects based
       on  the  allocation  definition.    Estimate  by  counting 1  if
       variable length.

  **   The use of 'Reuse of deleted records' counts 1.

  **   Count 1 for the library object.

  **   Large objects (any  object type)  require multiple sub  objects.
       Count 1 for an  object size between 16 and 32MB.   Count 2 if an
       object exceeds 32MB.

Working with the LIBCNTP file
-----------------------------

You  may write  a program  or a  query to  analyze the  library summary
records in LIBCNTP.

An alternative is  to use the  PRTDB command and  print the fields  you
are interested in.

Command parameters                                    *CMD
------------------

   LIB           The library  to be summarized.   A list  of up to  300
                 libraries may  be named.   A generic name  may be used
                 for  any library or the  special values *ALL, *NONSYS,
                 or *ALLUSR.    The  value *NONSYS  means  any  library
                 that  would  be  saved   by  the  SAVLIB  LIB(*NONSYS)
                 function.   The value  *ALLUSR means  any library that
                 would be saved  by the  SAVLIB LIB(*ALLUSR)  function.

   OMITLIBS      A  list of  up to  40 libraries  to be  omitted.   The
                 default is *NONE.

                 A  library  name  or a  generic  library  name may  be
                 entered.  All  library names entered  must exist.   If
                 a  generic name  is specified,  at  least one  library
                 with the  generic name must exist.   There is no check
                 made  for illogical  statements such  as LIB(LIBA) and
                 OMITLIBS(LIBA).

   OUTLIB        The library  to be  used for  the LIBCNTP  file.   The
                 default  is  *LIBL  which  may  be used  if  the  file
                 exists  on the library list.   A specific library must
                 be named if the LIBCNTP file cannot be found.

   OUTMBR        The member  to be  used  for the  LIBCNTP file.    The
                 default is LIBCNTP.

   REPLACE       A YES/*NO  value for  whether to  replace the data  if
                 an  existing LIBCNTP  file is  used.   The  default is
                 *YES to replace data.

                 *NO may  be  specified  to add  data  to  an  existing
                 member.

   OUTLIB2       The library  to be  used for  the LIBOBJP  file.   The
                 default  is  *NONE.   *LIBL  may be  specified  if the
                 file  exists on the library  list.  A specific library
                 must be named if the LIBOBJP file cannot be found.

   OUTMBR2       The member  to  be used  for the  LIBOBJP  file.   The
                 default is LIBOBJP.

   REPLACE2      A  YES/*NO value for  whether to  replace the  data if
                 an  existing LIBOBJP  file  is used.   The  default is
                 *YES to replace data.

                 *NO may  be  specified  to  add data  to  an  existing
                 member.

Restrictions
------------

The user must be authorized to the TAADSPADP authorization list.

The LBINTC field  in the LIBCNTP file  is an estimate of  the number of
internal objects used by a Save command.

Prerequisites
-------------

The following TAA Tools must be on your system:

     CHKGENERC       Check generic
     CHKGENOBJ       Check generic object
     CHKIBMLIB       Check IBM library
     DUPFILFMT       Duplicate file format
     EXTLST          Extract list
     RTVDBFA         Retrieve data base file attributes
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDSTSMSG       Send status message
     TAAEXC          TAA Execute command

Implementation
--------------

None, the tool is ready to use.

Objects used by the tool
------------------------

   Object        Type    Attribute      Src member    Src file
   ------        ----    ---------      ----------    ----------

   CVTLIBCNT     *CMD                   TAALICE       QATTCMD
   TAALICEC      *PGM       CLP         TAALICEC      QATTCL
   TAALICEC11    *PGM       CLP         TAALICEC11    QATTCL
   TAALICER      *PGM       RPG         TAALICER      QATTRPG
   TAALICEP      *FILE      PF          TAALICEP      QATTDDS
   TAALICEQ      *FILE      PF          TAALICEQ      QATTDDS
					

Added to TAA Productivity tools January 1, 1999


Home Page Up to Top