TAA Tools
RMVOLDMBR2      REMOVE OLD MEMBER 2                    TAADBIP

The  Remove Old  Members 2  command  allows you  to  retain a  specific
number  of members  in a  file.   The excess  oldest members  (based on
member  creation date)  are removed.   This can be  useful when dealing
with date  oriented  members.   Only  multi-member  data files  may  be
used.

A typical command would be:

             RMVOLDMBR2    FILE(xxx) RETAINMBRS(5)

The newest  5 members  in the  file (based on  creation date)  would be
retained.  The excess oldest members would be removed.

You must have *OBJEXIST authority to the file to use RMVOLDMBR2.

The  file must  be a  data file  (not a  source file).   The  file must
contain more than a single member.

The system  does not track  creation time.   To  perform the  function,
the list  of members is retrieved  and then sorted in  descending order
on creation  date.  If multiple members were  created on the same date,
the sequence of processing is by member  name.  Thus it is possible  to
remove a  member which is  not strictly the  oldest member if  multiple
members were created on the same day.

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

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

   RETAINMBRS    The  number  of  members  to be  retained.    A number
                 between 1 and 32,767 must be entered.

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

See previous comments.

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

The following TAA Tools must be on your system:

     EDTVAR          Edit variable
     RTVDBFA         Retrieve data base file attributes
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDESCMSG       Send escape message
     SNDSTSMSG       Send status message

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

None, the tool is ready to use.

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

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

   RMVOLDMBR2    *CMD                   TAADBIP       QATTCMD
   TAADBIPC      *PGM       CLP         TAADBIPC      QATTCL
   TAADBIPR      *PGM       RPG         TAADBIPR      QATTRPG
					

Added to TAA Productivity tools July 1, 1998


Home Page Up to Top