PRTDBFANL       PRINT DATA BASE FILE ANALYSIS          TAADBFT

 The 3 commands  ADD/PRT/RMVDBFANL allow for  analysis of the  growth of
 physical  file  members.    No  source  members or  logical  files  are
 included.

 The  intent of this support is  that once a month  or so, you would run
 the ADD command.  This will  add a record to the DBFANLP file  for each
 physical  data member  (non-source) in  the specified  libraries.   The
 PRT  command can then  be used  to analyze a  single period  or any two
 periods.   The  RMV  command can  be  used  to delete  records  in  the
 DBFANLP file when they are no longer needed.

 Periodically, you may  choose to run the analysis  against the previous
 month,  last quarter,  six months  ago or a  year ago  to see  how your
 data base is growing.

 There can only  be one  DBFANLP file per  library.   Each DBFANLP  file
 can be used to store  the data for one or more libraries.   If you have
 production  libraries,  the  typical  solution  would be  to  have  one
 DBFANLP file in each library to be analyzed.

 A typical ADD command would look as follows:

          ADDDBFANL    LIB(LIB1 LIB2) OUTLIB(QGPL)

 This  would add  one record  to the  DBFANLP file  in QGPL for  all the
 physical  file data  members  found  in  LIB1  and LIB2.    Any  source
 members are  excluded.  The DSPFD  outfile support is used  to generate
 the information.

 The PRT  command has two options.  The  first option is to analyze only
 a single month.  A typical command would appear as:

          PRTDBFANL    FROMYYMM(0502) OUTLIB(QGPL)

 A report  would appear  with one  line per  physical  file member  that
 includes the  size, number of records,  number of deleted  records etc.

 The  second  use of  the  PRTDBFANL  command would  be  to  compare two
 months of data.   This can  be any two  months you  select.  A  typical
 command would appear as:

          PRTDBFANL    FROMYYMM(0502) TOYYMM(0511) OUTLIB(QGPL)

 The same  report would appear  with two lines  per member (if  the same
 member  existed  at  both times).    Additional  information exists  to
 describe the percentage change.

 To  cleanup  the  DBFANLP  file  for  unwanted  history,  the RMVDBFANL
 command would be used.  A typical command would appear as follows:

          RMVDBFANL    FROMYYMM(0511) OUTLIB(QGPL)

 This will delete  all the specified records  in DBFANLP.  The  deletion
 is done  by using  the CPYF  command to omit  the unwanted  records and
 then a  copy back.  An option exists to  delete all records with a date
 that is equal to or older than that specified.

 Each time  the  ADDDBFANL command  is run,  records  are added  to  the
 DBFANLP file.   If ADDDBFANL is run  multiple times in the  same month,
 multiple  records will  exist for  the  same month.   However,  the PRT
 command will only  consider the  first record for  each file/member  in
 the same month.

 The  DBFANLP file  uses the  format  of the  DSPFD  command output  for
 TYPE(*MBR)  which  is  QWHFDMBR.    You  may write  your  own  analysis
 programs against this file.

 It  is valid to  compare two months that  exist in different centuries.

 ADDDBFANL command                                     *CMD
 -----------------

 The ADDDBFANL  command must perform  a DSPFD  for every library  named.
 Since it  is a slow running  command, it should be  submitted to batch.
 It supports the following parameters:

    LIB           A  list of libraries (up  to 50) that you  want to add
                  records  for.    *LIBL,  *CURLIB,  &USRLIBL,  *ALL  or
                  *ALLUSR  may   be  specified   which  uses   the  same
                  definition as exists on DSPFD.

    OUTLIB        The  library for  the DBFANLP  file.   The  default is
                  *LIBL.  If the  file does not  exist, *LIBL cannot  be
                  used.

 PRTDBFANL command                                     *CMD
 -----------------

 The PRTDBFANL command analyzes  one or two different sets  of data from
 the DBFANLP  file and prints  a report to  QPRINT.  It  uses OPNQRYF to
 select  records  and  build an  access  path.   The  command  should be
 submitted to batch.  It supports the following parameters:

    FROMYYMM      A 4  digit  entry in  the form  YYMM  to describe  the
                  beginning  month   or  only  month's   records  to  be
                  analyzed.   It  is valid  to cross a  century boundary
                  with TOYYMM.

    TOYYMM        A 4  digit entry  in  the form  YYMM to  describe  the
                  ending month  to be  analyzed.   The default  is *NONE
                  meaning  only the  month named  in  FROMYYMM is  to be
                  analyzed.

    DBFANLPLIB    The library  for the  DBFANLP file.   The  default  is
                  *LIBL.

    MINFRMSIZ     The minimum amount of  size in the From file  to cause
                  both the  From and To  records to print.   The default
                  is 0 meaning all From/To records will print.

                  If  a value  is entered,  the From  record is checked.
                  If the value  is less than the  data size of the  From
                  record, both the From and To records are bypassed.

                  The  intent  of  the  parameter  is to  allow  you  to
                  minimize the amount of data that is output.

                  If  a minimum  size is  entered and  only a  To record
                  exists, the To record will always be listed.

 RMVDBFANL command                                     *CMD
 -----------------

 The RMVDBFANL command removes the records  for one month or a range  of
 months  from  the   DBFANLP  file.    The  command   uses  CPYF  select
 statements to  a file named DBFANLP2 which  is automatically created in
 the same library  as the DBFANLP  file.  At  the successful  completion
 of the  command,  the DBFANLP2  file is  automatically deleted.   If  a
 failure  occurs during processing,  you may  need to complete  the copy
 from  DBFANLP2  to  DBFANLP  and then  delete  DBFANLP2.    The command
 supports the following parameters:

    FROMYYMM      A 4  digit  entry in  the form  YYMM  to describe  the
                  beginning  month   or  only  month's   records  to  be
                  removed.   The YYMM  specified does not  have to exist
                  in the file.

                  The special value  *OLDEST is supported.   If this  is
                  used, TOYYMM must  be a specific date.   If *OLDEST is
                  used,  any  records  with dates  prior  to  the TOYYMM
                  date are removed.

                  RMVALLLFM cannot be  used across  a century  boundary.

    TOYYMM        A 4  digit  entry in  the form  YYMM  to describe  the
                  ending  month to  be removed.    The default  is *NONE
                  meaning  only  the month  named in  FROMYYMM is  to be
                  removed.

    DBFANLPLIB    The library  for the  DBFANLP  file.   The default  is
                  *LIBL.

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

 None.

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

 The following TAA Tools must be on your system:

      EXTLST       Extract list
      QRYF         Front end to OPNQRYF
      RTVSYSVAL3   Retrieve system value 3
      SNDCOMPMSG   Send completion message
      SNDESCMSG    Send escape message
      SNDSTSMSG    Send status message

 Change in DSPFD format on a new release
 ---------------------------------------

 Because  of the  technique used,  any  DBFANLP file  created should  be
 insensitive  to additional fields being added to  the DSPFD format in a
 new release.

 If the DSPFD format  is changed, new fields  are normally added at  the
 end  of  the  format  which  will not  be  used  by  PRTDBFANL.    When
 ADDDBFANL  is  used, the  current  release DSPFD  format  is  output to
 QTEMP and then CPYF with FMTOPT(*MAP) is  used to copy the data to  the
 permanent DBFANLP  file.  The  DBFANLP file  is initially created  with
 the DSPFD format of the current release.

 In case  difficulties arrive, you can  still save the data  in the file
 by doing the following:

          --   Use DSPFD to create the DBFANLP2 file as follows:

           DSPFD    FILE(DBFANLP) TYPE(*MBR) OUTPUT(*OUTFILE)
                      FILEATR(*PF) OUTFILE(xxxx/DBFANLP2)

          --   Copy the existing data to the new file:

            CPYF    FROMFILE(DBFANLP) TOFILE(DBFANLP2)
                       MBROPT(*REPLACE) FMTOPT(*MAP)

          --   Delete the DBFANLP file.

          --   Use CPYF to re-create the file

            CPYF    FROMFILE(DBFANLP2) TOFILE(xxxx/DBFANLP)
                       CRTFILE(*YES)

          --   Delete the DBFANLP2 file.

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

 None, the tool is ready to use.

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

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

    PRTDBFANL     *CMD                       TAADBFT       QATTCMD
    ADDDBFANL     *CMD                       TAADBFT2      QATTCMD
    RMVDBFANL     *CMD                       TAADBFT3      QATTCMD
    TAADBFTC      *PGM           CLP         TAADBFTC      QATTCL
    TAADBFTC2     *PGM           CLP         TAADBFTC2     QATTCL
    TAADBFTC3     *PGM           CLP         TAADBFTC3     QATTCL
    TAADBFTR      *PGM           RPG         TAADBFTR      QATTRPG

 Structure
 ---------

 PRTDBFANL  Cmd
   TAADBFTC   CL
     TAADBFTR   RPG

 ADDDBFANL   Cmd
   TAADBFTC2   CL

 RMVDBFANL   Cmd
   TAADBFTC3   CL

Added to TAA Productivity Tools April 1, 1995


Home Page

Powered by AS/400Powered by AS/400 Last modified on July 15, 2010 © 1995, 2010 - Jim Sloan, Inc.