TAA Tools
PRTLIBANL      PRINT LIBRARY ANALYSIS                  TAALIBA

The PRTLIBANL  command is  intended to  be used to  determine how  many
objects  exist in  a  library or  in  a total  system.   It  produces a
report  with the  library name,  number of objects  and size.   It also
totals  the   number  of  programs,   the  number   of  data   physical
files/records,  the  number  of   source  files/members/records  and  a
breakdown  by source type.   At the  end of the report  it analyzes all
the objects by type  and size and then  makes special summaries of  the
types  of programs,  types  of files  and  types of  source.   It  also
provides summaries from a Save/Restore viewpoint and by owner.

The  command should  be submitted  to batch.   PRTLIBANL  requires some
long running commands  to build files  and an RPG program  to read  the
files.   If the command is  to be executed  for the entire  system (all
libraries), it  should be submitted  by the Security  Officer to ensure
that all objects can be read.

If  the entire  system is  analyzed, the  size of  the total  number of
objects will  not agree to  the information which  is displayed by  the
WRKSYSSTS  command.     Only   external  objects  are   accumulated  by
PRTLIBANL.    Therefore,  the auxiliary  storage  requirements  for the
licensed internal  code,  directories  and temporary  objects  are  not
included.   The amount excluded will  vary.  See the  later discussion.

If a  single library is analyzed,  the name of the  library is used for
the spooled  print  file.   If  multiple libraries  are  analyzed,  the
output is to the PRTLIBANL file.

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

   LIB           Enter the name  of the library, generic library,  or a
                 list  of up  to  300 libraries  to be  analyzed.   The
                 special  values *ALL, *USRLIBL,  *ALLUSR, *ALLNONQ, or
                 *TEST may  be entered  (see the  TSTLIB parameter  for
                 *TEST).  Also see the OMITLIB parameter.

                 If  *ALL is  specified, additional  processing occurs.

   LIBTYPE       Whether  to select  all or  a specified  library type.
                 *ALL is the default to select all types.

                 *PROD may  be used  to select  only production  (PROD)
                 libraries.

                 *TEST  may  be   used  to  select  only   test  (TEST)
                 libraries.

   ASP           Whether  to process  all or  just  the libraries  in a
                 specific numbered ASP.   The default  is *ALL for  all
                 ASPs.   A  specific ASP  may be  named in  a range  of
                 1-99.

   LIBONLY       A  *YES/*NO value that  defaults to  *NO.   *YES means
                 that  only the first part of  the report (one line per
                 library)  will be  printed.    The other  analysis  is
                 suppressed.   This does  not significantly  impact the
                 time it takes to perform PRTLIBANL.

                 For  a  better performing  one line  summary,  use the
                 PRTLIBCNT TAA Tool.   This provides  only a count  and
                 size by library.

   OMITLIB       A  list of  up  to 300  libraries  or generic  library
                 names that  should be omitted.   *NONE is the default.

                 An omit list may not be entered for LIB(*CURLIB).

                 Any library entered is checked for existence.

                 No check occurs to see  if an omit library would  have
                 been  selected.     For  example,  if   LIB(*LIBL)  is
                 entered  with OMITLIB(ABC) and  library ABC is  not on
                 the library list, no error occurs.

   ASPDEV        Specifies  the  auxiliary  storage  pool  (ASP) device
                 name where storage  for the  libraries to be  analyzed
                 are located.   The  ASPDEV named must  be in  the name
                 space  of the current thread.   Use SETASPGRP to bring
                 the ASPDEV into the name space.

                 The parameter  can  be  specified  as a  list  of  two
                 values  (elements)  or   as  a  single  value.     The
                 possible single values are:

                 * =  The ASPs that are currently  part of the thread's
                 library name  space will  be  searched to  locate  the
                 library.   This includes the  system ASP (ASP  1), all
                 defined  basic  user ASPs  (ASPs  2-32),  and, if  the
                 thread  has an  ASP group,  the primary  and secondary
                 ASPs in the thread's ASP group.

                 *ALLAVL = This value  is ignored.  Only ASP  groups in
                 the  name space  can be  analyzed.   It is  being kept
                 for compatibility.

                 *CURASPGRP  =  If the  thread  has an  ASP  group, the
                 primary and secondary ASPs  in the thread's ASP  group
                 will  be  searched.    The  system  ASP  (ASP  1)  and
                 defined  basic  user  ASPs  (ASPs  2-32)  will not  be
                 searched.   If no  ASP group  is associated  with  the
                 thread, an error will be issued.

                 *SYSBAS  = The  system  ASP (ASP  1)  and all  defined
                 basic  user  ASPs  (ASPs  2-32)  will be  searched  to
                 locate  the  library.   No  primary or  secondary ASPs
                 will  be searched  even  if  the  thread  has  an  ASP
                 group.

                 Element 1: Device

                 The  device name of  the primary  or secondary  ASP to
                 be  searched.  The primary or  secondary ASP must have
                 been activated (by varying on  the ASP device) and  be
                 a part  of the  name space.   The  system ASP (ASP  1)
                 and  defined user basic  ASPs (ASPs 2-32)  will not be
                 searched.

                 Element 2: Search type

                 *ASP  =  Specifies  that  only  the  single  auxiliary
                 storage pool  (ASP) device  named in  element 1 is  to
                 be searched.

                 *ASPGRP  =  Specifies that  the  entire  group of  the
                 primary  auxiliary storage pool  (ASP) device named in
                 element 1 is to be searched.

   TSTLIB        Running   a   test   of   *ALL   libraries   takes   a
                 considerable amount  of time.   To allow  for testing,
                 a  test library may be named  to contain the files and
                 data  for  TAALIBAP,  TAALIBAP2  and  TAALIBAQ.    For
                 normal use, the default should be used.

                 TAALIBAP  must contain  DSPFD  *MBR  data.   TAALIBAP2
                 must  contain  DSPOBJD data.    TAALIBAQ  must contain
                 DSPOBJD data for library objects in QSYS.

   DLYHRS        The number of hours to  delay execution.  The  default
                 is 0 meaning to  execute immediately.  If a  number is
                 specified,  the  command will  delay  after it  begins
                 execution.

                 If  LIB(*ALL)  is  specified,  the  command  should be
                 submitted  to batch.    If  submitted  to  batch,  the
                 DLYJOB  parameter would  causes  the job  to begin  to
                 execute and then be delayed by the DLYJOB command.

                 The  intent  of  this parameter  is  to  allow  you to
                 submit the  command  before going  home at  night  and
                 allow the command  to execute after your  normal batch
                 work is done.

   PRTFILE       The  qualified name of the  printer file to  use.  The
                 default is TAAPRT1 in *LIBL.   If a single library  is
                 analyzed, the  name of  the spooled  file will be  the
                 library  name.   If multiple  libraries  are analyzed,
                 PRTLIBANL will be the name of the printer file.

System Size Summary
-------------------

If  LIB(*ALL)  is requested,  information  is presented  to  attempt to
reconcile the  storage amount  used described on  WRKSYSSTS versus  the
storage that  can be accounted  for in libraries.   The method  used by
PRTLIBANL  is  not exact,  but can  provide  a better  understanding of
storage usage.

The  Operational  Assistant  (OA)  provides  a  similar  function  that
accesses internal  information and  has accurate  information.  Use  GO
ASSIST,  then option 11 and  then option 4  for Disk Space  Tasks.  The
output from PRTLIBANL may be more desirable.

The system reports storage in  millions of bytes, megabytes,  kilobytes
and bytes.   To avoid confusion,  all the information is  translated to
millions of bytes and rounded.

The first  output includes one  line per library and  summarizes all of
the  objects  found  in  libraries.   System  libraries  account  for a
significant amount of space.

An ASP  summary is  then shown which  prints one  line per  ASP.   This
information comes  from a combination of the  WRKDSKSTS information and
by counting objects/sizes by ASP.

The  WRKDSKSTS  information includes  the  amount of  storage  for each
disk unit and the  percentage used.  This is  summarized by ASP and  an
overall percentage is  shown of usage by  ASP.  If checksums  are used,
the  amount of  total storage  by  ASP does  not include  the temporary
space nor  the  amount of  checksum  space.   Consequently,  the  total
amount of storage will not match the disk configuration.

The amount of  storage used is  summarized from WRKSYSSTS as  the total
amount to  account for.   If there is only  a single ASP  (only ASP 1),
the  total from  WRKDSKSTS and  WRKSYSSTS are  the same for  both total
storage and usage.

When PRTLIBANL is run, it  will not account for storage found  in QTEMP
libraries that  are active at  the time.   These will be  accounted for
in  the  user  profile  storage summary,  but  not  in  the  summary of
objects found  in libraries.   For  the best  results,  you should  run
PRTLIBANL when no other  jobs are active and when a new  job is started
(e.g.  SBMJOB) for PRTLIBANL.

Not  all objects  on the system  are kept  in libraries.   However, the
user profile keeps a reasonably  accurate account of the storage  owned
per profile.  If  you suspect the user profile  numbers are inaccurate,
causing an  abnormal IPL will  cause authorization recovery  which will
verify  the  numbers.   The numbers  can be  used  to account  for some
space that  is outside of  libraries.   DSPUSRPRF is used  to create  a
data base file of all profiles and the storage owned is summarized.

For  certain system  supplied profiles,  it  is normal  to own  objects
that  are not in libraries.  Examples  of this ownership include office
distribution items owned  by QDOC, data base  formats owned by  QDBSHR,
and  internal  operating  system  objects   owned  by  QSYS.    Several
profiles  are printed  in  detail as  well as  a single  total  for all
other profiles.

The total  owned that  is in  libraries is  subtracted from  the  total
kept in the  user profiles.  The difference  in all of the  profiles is
added.   In  some cases  a profile  may own  more storage  in libraries
than  is found in the user profile storage  value.  This is normally an
indication of 1)  other jobs are  active when PRTLIBANL  is run or  2),
the user  profile storage value is off.   If the user  profile value is
less than the library value, the difference is ignored.

The  size of  the licensed internal  code is  added.   The size differs
from 9402/9404 versus 9406.

To allow for a  dump of main memory, a  reserved space exists which  is
created to be the same size.  This amount is added.

On each  disk (other than  the load  source unit), a  1 million  + byte
area  is   used  for  cross  referencing  purposes.     This  value  is
multiplied by  the number  of disk  units found  on  WRKDSKSTS and  the
amount is added.

When PRTLIBANL runs, the  TAA tools CVTDSKSTS and CVTSYSSTS  are run to
gather  the  information  about  storage  used.   Following  this,  the
outfiles  are created  in QTEMP  for DSPOBJD  and DSPFD for  the entire
system.   While QTEMP  becomes quite  large during  the PRTLIBANL  job,
the  size  is  not  considered  because  of  when  the  information  is
captured  by  CVTDSKSTS,  CVTSYSSTS and  when  the  user  profile owned
storage is retrieved.

The licensed  internal  code  uses  a variety  of  tables  and  control
blocks that  cannot be accounted for  by PRTLIBANL.  The  major factors
are the  size of the Error log, Trace tables  and VLOG.  Default values
are shipped which can be changed using  SST.  For the VLOG, the  system
varies the  default based on the  size of the  system.  An  estimate is
used for  these internal values (based  on the size of  the system) and
the estimate is added.

It   is  possible   that  your   system  may   have  been   changed  to
significantly alter  the size  of some of  these areas.   For  example,
the trace  table can be  set to a very  large value.   To determine the
actual  values of the major  factors, use STRSST.   The following shows
the SST  menu structure  and the  options to  take.   Although you  are
primarily taking  'Change' options,  no changes will  occur if  use F12
when the  actual 'Change Displays' are shown.   Note that for the Error
Log, the system defaults are for  a small system and the display  shows
recommended  sizes.   If  you have  sufficient  auxiliary storage,  you
should consider changing the sizes to the recommended values.

  STRSST (Displays SST menu)

      1. Start a Service Tool

            1. Error Log
                 3. Change error log sizes
                       Shows sizes of the Error log pieces

            2. Trace vertical license internal code
                 1. Allocate trace tables
                      1. Allocate general trace table
                           Shows current size
                      2. Allocate task switch table
                           Shows current size

            5. Vertical license internal code log
                 5. Change the VLIC log sizes
                      Shows the note log size and
                         the dump log size

When a  system is IPLed,  the system creates  space for a  given number
of  jobs.   This storage  will hold  the PAGs  and other space  used by
active jobs.  The number  of job areas created is controlled  by system
values.   If the  amount of jobs  active at a  given time  exceeds this
number,  additional structures  are created.   Only  an IPL  will reset
the structures  to their original  value.   This space  is spread  over
the available disk units.

The internal storage  management directory which contains  the location
of  every object and  the allocations assigned  on disk is  also spread
over the  available disk  units.   Other internal  objects also  spread
over available disk units.

The size  of this  internal space  (PAGs, storage management  directory
etc.)  can be  estimated  by  beginning with  the  'Current Unprotected
Used'  amount shown on  WRKSYSSTS.  This  value is intended  to be used
in planning for  Checksums.  The total  shown includes the size  of the
load  source  unit   which  is  never  checksummed  so   it  should  be
subtracted.   The load  source unit is  always the first  unit shown on
WRKDSKSTS.  The remaining value  is the amount of internal space  usage
on all  the disk units  except the  load source unit.   There  are also
internal spaces  on the load source unit.   The size is approximated by
dividing the remainder  by the  number of  disk units  (minus the  load
source) and then  adding the average  to the remainder.   This estimate
is then added.

All the  additive amounts are summed and added  to the total of objects
found  in libraries.  A comparison is  then made to the WRKDSKSTS value
and a difference  printed.   Because of the  technique used, the  final
difference can be plus or minus.

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

See the  prior comments about the  accuracy of the  total storage found
when LIB(*ALL) is specified.

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

The following TAA Tools must be on your system:

      ADDDAT        Add date
      CVTDSKSTS     Convert WRKDSKSTS to a data base file
      CVTSYSSTS     Convert WRKSYSSTS to a data base file
      DSPFDA        DSPFDA with adopt (part of DSPADP)
      DSPOBJDA      DSPOBJD with adopt (part of DSPADP)
      DSPUSRPRFA    DSPUSRPRFA with adopt (part of DSPADP)
      RTVRELID      Retrieve release ID
      RTVSYSVAL3    Retrieve system value 3
      SNDCOMPMSG    Send completion message
      SNDESCMSG     Send escape message
      SNDSTSMSG     Send status message
      TAAARC        TAA Archive
      WRTSRC        Write source

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

None, the tool is ready to use.

Objects used
------------

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

   PRTLIBANL     *CMD                      TAALIBA        QATTCMD
   TAALIBAP      *FILE         PF          TAALIBAP       QATTDDS
   TAALIBAP2     *FILE         PF          TAALIBAP2      QATTDDS
   TAALIBAQ      *FILE         PF              No source
   TAALIBAS      *FILE         PF          TAALIBAS       QATTDDS
   TAALIBAT      *FILE         PF          TAALIBAT       QATTDDS
   TAALIBAL      *FILE         LF          TAALIBAL       QATTDDS
   TAALIBAC      *PGM          CLP         TAALIBAC       QATTCL
   TAALIBAC2     *PGM          CLP         TAALIBAC2      QATTCL
   TAALIBAC3     *PGM          CLP         TAALIBAC3      QATTCL
   TAALIBAC4     *PGM          CLP         TAALIBAC4      QATTCL
   TAALIBAR      *PGM          RPG         TAALIBAR       QATTRPG
					

Added to TAA Productivity tools April 1, 1995


Home Page Up to Top