TAA Tools
RCLSTG2         RECLAIM STORAGE 2                      TAARCLA

The Reclaim  Storage 2  tool is  a front  end to RCLSTG.   It  provides
better  documentation of the  results of  RCLSTG and keeps  the history
where  it may be conveniently displayed.   There is no reasonable means
of estimating how  long RCLSTG will  take on a  system other than  your
own experience.

You  must be  authorized to  the TAARCLSTG2  authorization list  to use
RCLSTG2.   The  RCLSTG2 program will  adopt the  QSECOFR profile during
the running of the command.   If you intend to use RCLSTG2, you  should
consider  making the  RCLSTG  command private  so  that  users such  as
QSYSOPR are forced to use RCLSTG2.

            RVKOBJAUT   OBJ(RCLSTG) OBJTYPE(*CMD) USER(*ALL)

As  with RCLSTG, you  must be in  the restricted state  to run RCLSTG2.
If you want to  run in an unattended  environment, you should  consider
the use of  the DLYCMD tool.   It will allow  you to enter  the command
at  the  console before  going  home and  have  the function  performed
(including  entering the restricted  state) at a  specific time or when
batch work has completed.

The same  parameters that exist  on RCLSTG  also exist  on RCLSTG2.   A
typical command would be:

            RCLSTG2

This would  take the defaults  of SELECT(*ALL) and  OMIT(*NONE) causing
all RCLSTG functions to be performed.

If  the RCLSTGHSTP file does not  exist in QGPL, it  is created and the
ownership is changed to QSECOFR.   A record containing the  information
about the RCLSTG2  results is written to  the file.  This  contains the
start  and end  dates/time, the  elapsed  time, the  options specified,
the number  of records  in the  QADBXREF file,  the  number of  objects
found  on  the system,  etc.    The  information  in the  file  can  be
displayed or printed with the DSPRCLHST command such as:

              DSPRCLHST

This would  cause a display  of the last  RCLSTG2 run and  the results.
Rollup  and rolldown are  supported to see  other results from previous
uses of RCLSTG2.

Testing RCLSTG2
---------------

You can  try  the function  without entering  the  restricted state  by
just doing the following:

  **   Create a test data area in QTEMP:

             CRTDTAARA    DTAARA(QTEMP/TSTRCLSTG2) TYPE(*CHAR) LEN(10)

  **   Enter RCLSTG2  command and it  will simulate the function.   The
       check  for  whether the  system is  in  the restricted  state is
       bypassed.   It  takes  about  15 seconds  including  some  delay
       time.

             RCLSTG2

  **   Display the results:

             DSPRCLHST

  **   Clear out the test record with:

             MTNRCLHST

Differences with RCLSTG
-----------------------

RCLSTG2  is  code  that  wraps around  RCLSTG  so  that  the  important
information is  captured and written to the  RCLSTGHSTP file.  A little
overhead is added to the normal function of RCLSTG.

RCLSTG does  write  to  a  data area  (QRCLSTG  in  QUSRSYS)  with  the
beginning and  ending date/time,  but only  the last use  of RCLSTG  is
stored along  with minimal system information and  no command parameter
information.   Note that  if RCLSTG has  never been run,  the data area
may contain  information  from a  system preload.    RCLSTG does  write
messages to  QHST containing how many  objects exist on the  system and
how many objects were deleted.

What  RCLSTG2 does is to gather all  of the appropriate information and
add a record to a file that can be displayed or printed.

Commands supported
------------------

      RCLSTG2      Front end to RCLSTG
      DSPRCLHST    Display or print RCLSTG2 history
      MTNRCLHST    Maintain old RCLSTG2 information

MTNRCLHST
---------

MTNRCLHST is used to  remove old RCLSTG2 history  when it is no  longer
needed.   You  must  have all  rights  to the  RCLSTGHSTP  file to  use
MTNRCLHST.   The  RTNDAYS parameter may  be used  to describe  how many
days of RCLSTG2 results you  want to retain.   The default is 3  years.

A typical command would be:

             MTNRCLHST

MTNRCLHST  attempts  to  create  a  temporary  file   by  the  name  of
RCLSTGHST2  in QGPL.   If the  file does  not exist  it is  created and
copied  to with the  records from RCLSTGHSTP that  are greater than the
retention date  calculated from  the  RTNDAYS parameter.   The  smaller
file  is then  copied back  to  replace RCLSTGHSTP  and the  RCLSTGHST2
file is deleted.

If  the RCLSTGHST2 file exists, the  command will not run.   If this is
your file intended  for some other  purpose, the file  must be  renamed
or you must perform your own maintenance of RCLSTGHSTP.

If  the  file  was  created  from a  previous  use  of  MTNRCLHST,  the
previous  command  did  not complete  normally.    You should  manually
review the information in both RCLSTGHSTP  and RCLSTGHST2.  You may  be
able to just delete RCLSTGHST2 and then use MTNRCLHST again.

RCLSTG2 escape messages you can monitor for
-------------------------------------------

      TAA9896    The system is not in the restricted state.

DSPRCLHST escape messages you can monitor for
---------------------------------------------

      None.

MTNRCLHST escape messages you can monitor for
---------------------------------------------

      TAA9893    The retention date will cause all records
                    to be removed.  Use CLRPFM instead.

RCLSTG Discussion
-----------------

RCLSTG is not very well  understood in terms of what it  does and there
is no  good method of  estimating how long  it will take.   The command
has several functions such as:

     - Rebuilding the system internal cross reference files
     - Ensuring addressability to all objects
     - Ensuring all objects are owned
     - Ensuring all members are connected to a file
     - Ensuring all IFS directory entries and objects exist

RCLSTG  will place objects into the QRCL  library for your review if it
cannot  determine where  they  should  belong.   Some  objects  may  be
deleted (such as if a temporary object was found).

Only  the single  function  of 'Rebuilding  the  system internal  cross
reference  files'  can  be  broken out  and  done  separately  (See the
SELECT parameter).   This function  is rarely  needed, but  if run,  it
must  run to  completion.   During an  install  of a  new release,  the
cross  reference files must be  correct.  If  not, you may  be asked to
run this  piece  of  reclaim before  you  can  do the  install.    This
function is  generally a minor part  of a full  RCLSTG in terms  of the
time required.

The  rest of RCLSTG  can require a  very long  time on a  large system.
The major factors that influence the time required are:

        - How much main store exists
        - How many objects exist
        - How many IFS objects exist

One  of the major reasons  for RCLSTG was to  reclaim the space used by
objects in  QTEMP if  a system  abnormal termination  occurred.   These
were  retained  by the  system,  but had  no  connecting  links.   This
problem  was  solved some  time  ago (during  the V1  releases)  and no
longer represents  a valid reason  to run  RCLSTG.   QTEMP objects  are
now automatically cleaned up by the system.

Many  of the  problems  corrected or  found by  RCLSTG  are related  to
abnormal  system  terminations.    If  you  rarely experience  abnormal
terminations, it is probable that  RCLSTG will find very few  problems.

If you have  a small system  and sufficient dedicated system  time, you
may want to  run RCLSTG to provide a reassurance  that the system is in
synch and any problems are found.

If  you  have a  large system  and cannot  afford the  dedicated system
time,   you  should   avoid   running   RCLSTG  unless   your   service
representative recommends it.

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

RCLSTG2 is  a front end to  RCLSTG to allow capturing  of the important
RCLSTG  information  which is  placed in  a  file (RCLSTGHSTP  in QGPL)
that can  be displayed  or  printed.   You must  be authorized  to  the
TAARCLSTG2 authorization list to use RCLSTG2.

   SELECT        What  reclaim functions  to select.    The default  is
                 *ALL.

                 *QDBXREF  may  be  specified  to  rebuild  the  system
                 internal cross reference files.

                 *DIR may be  specified to rebuild  only the  directory
                 portion.

   OMIT          What  reclaim  functions  to omit.    The  default  is
                 *NONE.

                 *QDBXREF  may be specified  to omit the  rebuilding of
                 the system internal cross reference files.

                 *DIR  may  be specified  to  omit the  rebuild  of the
                 directory function.

   ASPDEV        The ASP  device or  group.   *SYSBAS  is the  default.
                 This describes system ASP and ASPs 2-32.

                 A specific ASP device or group may be named.

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

DSPRCLHST displays or prints the results of RCLSTG2.

   VERSION       What   RCLSTG2  version   to  print.     If   you  are
                 displaying  the  results,  this  parameter is  ignored
                 and   the   most   recent   RCLSTG2   information   is
                 displayed.   You may  roll to  other uses  of RCLSTG2.
                 If you  are printing the results,  *ALL is the default
                 to print  one page  for each  set of  RCLSTG2  results
                 found.  The results are printed in LIFO order.

                 If  you are  printing  the  results, you  may  specify
                 *LAST to print only the last use of RCLSTG2.

   OUTPUT        How  to output the  results.   The default is  * which
                 will  cause a display of the  last RCLSTG2 use if used
                 interactively.   If in batch  or *PRINT is  specified,
                 the results will be printed.

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

MTNRCLHST maintains  the RCLSTGHSTP  file to allow  old versions  to be
removed.   You  must  have all  rights to  the  RCLSTGHSTP file  to use
MTNRCLHST.

   RTNDAYS       The number  of days  to  retain RCLSTG2  records  for.
                 The  default   is  1096  which   allows  3   years  of
                 information to  be retained.  Any  records for RCLSTG2
                 dates prior  to the  number of  retain days,  will  be
                 removed.

                 The value must be between 1 and 80,000.

   DLTTSTRCD     A *YES/*NO value  for whether test records  (caused by
                 the  testing  function described  previously)  will be
                 deleted  from  the  file.    The  default  is  *YES to
                 delete the  test  records.   This avoids  seeing  them
                 when  DSPRCLHST is  displayed.   This applies  only to
                 records added after November of 2002.

                 *NO may be specified to retain the test records.

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

You  must be  authorized to  the TAARCLSTG2  authorization list  to use
RCLSTG2.

You must have all rights to the RCLSTGHSTP file to use MTNRCLHST.

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

The following TAA Tools must be on your system:

     ADDDAT          Add date
     CHKRSDSTE       Check restricted state
     CLCDATDIF3      Calculate date difference 3
     CLCTIMDIF       Calculate time difference
     CVTQHST         Convert QHST
     EDTVAR          Edit variable
     RTVDAT          Retrieve date
     RTVOBJCNT       Retrieve object count
     RTVRELID        Retrieve release ID
     RTVSYSSTS       Retrieve system status
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDESCMSG       Send escape message

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

None, the tool is ready to use.

To help ensure that RCLSTG  is not used (instead of RCLSTG2),  consider
revoking all authority to the RCLSTG2 command.

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

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

   RCLSTG2       *CMD                   TAARCLA       QATTCMD
   DSPRCLHST     *CMD                   TAARCLA2      QATTCMD
   MTNRCLHST     *CMD                   TAARCLA3      QATTCMD
   DLTRCLTST     *CMD                   TAARCLA4      QATTCMD
   TAARCLAC      *PGM       CLP         TAARCLAC      QATTCL
   TAARCLAC2     *PGM       CLP         TAARCLAC2     QATTCL
   TAARCLAC3     *PGM       CLP         TAARCLAC3     QATTCL
   TAARCLAR      *PGM       RPG         TAARCLAR      QATTRPG
   TAARCLAR22    *PGM       RPG         TAARCLAR22    QATTRPG
   TAARCLAR23    *PGM       RPG         TAARCLAR23    QATTRPG
   TAARCLAD      *FILE      DSPF        TAARCLAD      QATTDDS
   TAARCLAP      *FILE      PF          TAARCLAP      QATTDDS

Structure
---------

RCLSTG2     Cmd
   TAARCLAC   CL pgm
     TAARCLAR   RPG Pgm

DSPRCLHST   Cmd
   TAARCLAC2   CL pgm
     TAARCLAR22  RPG Pgm       Print pgm
     TAARCLAR23  RPG Pgm       Dsp pgm
       TAARCLAD    Dsp file

MTNRCLHST   Cmd
   TAARCLAC3   CL pgm
					

Added to TAA Productivity tools September 15, 2000


Home Page Up to Top