TAA Tools
RGZALLPFM       REORGANIZE ALL PFM                     TAAMBRL

The  Reorganize All  PFM (Physical  File  Members) command  reorganizes
all  members in  a physical data  file if  specified criteria  are met.
The system RGZPFM command allows only a single member to be named.

RGZALLPFM  should  be considered  a 'front  end'  to the  system RGZPFM
command.  The RGZPFM command is issued for each member in the file.

You must have *ALL authority to the file to use RGZALLPFM.

A typical command would be:

            RGZALLPFM    FILE(xxx)

Each  member  in the  file  would  be  reorganized  if  either  of  the
following default criteria are met:

          - 10% of the records have been deleted
          - 50,000 bytes of deleted record space exists

You  may specify  your own  values instead  of the  defaults.   You may
also  force the  reorganization of  all members.   Members  without any
records are  always bypassed.   RGZALLPFM  will operate  properly on  a
single member physical file.

If a member has only deleted records, it is reorganized.

Messages are sent for each member processed.

Differences with the system RGZPFM command
------------------------------------------

The following summarizes the differences:

  **   RGZALLPFM supports multiple members.

  **   RGZALLPFM supports  the DLTPCT, DLTSPACE, and  FORCE parameters.

  **   RGZPFM  supports reorganization of a  source file.   This was of
       benefit in the  early releases  of S/38 when  source files  were
       keyed,  but  is  of  no value  if  you  have  the  more  typical
       non-keyed source file.

Differences with RGZLIB TAA Tool
--------------------------------

Both  tools will  allow you  to reorganize  a multiple  member physical
file.

You   can  reorganize  just  a  single   physical  file  in  a  library
containing  other physical  files  with  RGZLIB, but  it  requires  two
entries to be  made with the EDTRGZLIB command  (after you have created
the RGZLIBP file):

       - A specific entry for the file to be reorganized
       - An omit entry for all other files in the library

If  you  have  only a  one  (or  a few)  multiple  member  files  to be
reorganized, RGZALLPFM is a simpler choice.

If  you are  interested  in  reorganizing  many  physical  files  in  a
library  (whether they  have  multiple members  or  not),  RGZLIB is  a
simpler choice.

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

   FILE          The  qualified  name of  the file  to  be reorganized.
                 The library  value defaults  to  *LIBL.   *CURLIB  may
                 also be used.

                 The file must  be a physical  data file (not  a source
                 file).

   DLTPCT        The delete  percentage to be considered.   The default
                 is 10%.

                 If  a value from  1 to 99 is  entered, then the member
                 must  have  at   least  that  percentage  of   deleted
                 records to cause reorganization.

                 An entry  of *NONE means the delete  percentage is not
                 considered.

                 The  member  is reorganized  if either  the  DLTPCT or
                 DLTSPACE  criteria   are   met   or   FORCE(*YES)   is
                 specified.

   DLTSPACE      The  amount of  space  that  can be  reclaimed  before
                 RGZPFM   will  be  used.     The  default  is  50,000.
                 Deleted record  space  is  determined  by  multiplying
                 the  number  of  deleted  records   times  the  record
                 length.

                 If  the value to  be tested  is 50,000, the  amount of
                 record  space that can be  reclaimed must be 50,000 or
                 greater before the member is reorganized.

                 The value should  be entered in  bytes.  For  example,
                 the value  100000 means the member must  have at least
                 100,000  bytes   of  deleted  record  space  to  cause
                 reorganization.

                 An entry of  *NONE means the  amount of deleted  space
                 is not considered.

                 The  member is  reorganized if  either  the DLTPCT  or
                 DLTSPACE   criteria   are   met   or  FORCE(*YES)   is
                 specified.

   FORCE         A *YES/*NO parameter  that determines  if all  members
                 should  be  reorganized  regardless  of  the  deletion
                 percentage  or  space.   Members  without any  records
                 are never reorganized.

                 *NO  is the default which  means each member will only
                 be reorganized  if it meets  either of  the DLTPCT  or
                 DLTSPACE parameter values.

                 *YES  may  be  entered  to  force  all  members  (that
                 contain  any records) to  be reorganized.   The intent
                 of forcing all members to  be reorganized would be  to
                 bring  the data  into  sequence  as per  the  physical
                 file  access  path definition.   Note  that  a logical
                 file access path may not  be used (See the RGZLIB  TAA
                 Tool if  you want to  use a  logical file access  path
                 to reorganize by).

   KEYFILE       Specifies  whether the  physical file  member  has its
                 arrival   sequence  changed  to  match  1)  its  keyed
                 sequence, 2)  the sequence of  a logical file  member,
                 or 3)  is not reorganized.  If  a multi-format logical
                 file  is  specified,  the  RCDFMT  parameter  must  be
                 specified.

                 The value  is passed  through to  the RGZPFM  command.
                 For  a further  understanding of  the parameters,  see
                 the RGZPFM help text.

                 This is a 3 part parameter.

                 The  first  part identifies  the  logical  file to  be
                 used to describe  the access path  or special  values.
                 If a special value  is entered, parts 2 and  3 must be
                 blank.

                 *NONE special  value.  The member  is not reorganized,
                 it is only compressed by removing deleted records.

                 *RPLDLTRCD  special value.   The member is reorganized
                 by replacing  deleted  records  at the  start  of  the
                 file with valid records from the end of the file.

                 *FILE special  value.  If the physical  file is keyed,
                 the  member  is reorganized  according  to  the access
                 path of the physical file.

                 The second  part  is the  logical  file library  if  a
                 logical file is  named.  *LIBL or *CURLIB  may also be
                 entered.

                 The  third  part  is  the  logical  file member  if  a
                 logical file is named.

   RBDACCPTH     Specifies whether  to rebuild  or maintain  any  valid
                 access paths (other  than an access path  specified as
                 the KEYFILE  or a MAINT(*REBLD) access  path) over the
                 member.   The  value is  passed through  to the RGZPFM
                 command.

                 *YES.  Access  paths will be rebuilt  synchronously at
                 the end of the reorganization.

                 *OPTIMIZE.       Access   paths   will    be   rebuilt
                 asynchronously   at  the  end  of  the  reorganization
                 based on which method will be the fastest.

                 *NO.   Access  paths  will be  maintained  during  the
                 reorganize.    If  *NO  is  specified,  ALWCANCEL(*NO)
                 must be specified.

   ALWCANCEL     A   *YES/*NO  parameter  that   specifies  whether  an
                 access path rebuild  may be cancelled.   The value  is
                 passed through to the RGZPFM command.

                 *NO  is the  default  meaning  a cancellation  is  not
                 allowed.        Using    *NO    also    requires    1)
                 KEYFILE(*RPLDLTRCD)  and  RBDACCPTH(*NO)  may  not  be
                 specified and 2) LOCK(*EXCL) must be specified.

                 *YES may be specified to allow a cancellation.

   LOCKSTATE     The lock  state to be  placed on  the member while  it
                 is reorganized.   The value  is passed through  to the
                 RGZPFM command.

                 *EXCL is the default.

                 *EXCLRD or *SHRUPD may be specified.

   RCDFMT        The  record format of  a multi-format  logical file to
                 be used  if  the  KEYFILE parameter  names  a  logical
                 file.   The  value  is passed  through  to the  RGZPFM
                 command.

                 *ONLY  is the default meaning  a single format logical
                 file is to be used.

                 The name of the  format to be  used if a  multi-format
                 logical file is to be used.


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

None.  See  the prior section  which discusses the  differences between
the RGZALLPFM TAA Tool and the system RGZPFM command.

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

The following TAA Tools must be on your system:

     EDTVAR          Edit variable
     RTVDBFA         Retrieve data base file attributes
     SNDCOMPMSG      Send completion message
     SNDESCMSG       Send escape message

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

None, the tool is ready to use.

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

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

   RGZALLPFM     *CMD                   TAAMBRL       QATTCMD
   TAAMBRLC      *PGM       CLP         TAAMBRLC      QATTCL
					

Added to TAA Productivity tools November 1, 1997


Home Page Up to Top