TAA Tools
RMVM2           REMOVE MEMBER 2                        TAAMBRK

The Remove  Member 2  command is intended  for the  case where  you are
trying to  remove a series of members  in a CL program that  may or may
not  exist.  The command allows you to  specify that if the member does
not exist, the command should complete without an escape message.

A typical command would be:

      RMVM2   FILE(xxx) MBR(yyy) IGNNOTFND(*YES)

The command would  complete normally  if the member  does not exist  or
the member was removed.

If you  use the system  command RMVM, you  would need to  monitor after
each use of the command to determine if the member did not exist.

You  can also specify two optional return  variables on RMVM2 to keep a
running count of  how many members  were removed and  how many did  not
exist.   The return  variables must  be specified  on each  use of  the
command such as:

      DCL     &RMVCNT *DEC LEN(5 0)
      DCL     &NOTFND *DEC LEN(5 0)
       .
      RMVM2   FILE(xxx) MBR(yyy) IGNNOTFND(*YES) +
                RMVCNT(&RMVCNT) NOTFNDCNT(&NOTFND)
      RMVM2   FILE(xxx) MBR(zzz) IGNNOTFND(*YES) +
                RMVCNT(&RMVCNT) NOTFNDCNT(&NOTFND)

When  all RMVM2  commands were  complete, the  &RMVCNT and  the &NOTFND
variables would contain  the total  number of members  removed and  not
found.

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

   FILE          The qualified  file  name of  the file.   The  library
                 value defaults to *LIBL.

   MBR           The  member to be  removed.   A specific name  must be
                 used.  A generic name may not be specified.

   IGNNOTFND     A  *YES/*NO  value  that defaults  to  *NO  meaning to
                 send an escape message  if the member does  not exist.
                 If  *YES  is specified,  a  'not  found' condition  is
                 ignored.

   RMVCNT        A  return  value  of the  number  of  members removed.
                 This an optional  variable name that  if used must  be
                 declared  as  *DEC  LEN(5  0).    The  intent  of  the
                 parameter is  to allow you to keep  a running count if
                 a series of  RMVM2 commands  are used.   The value  is
                 passed in  on the  command and  updated if the  member
                 is removed.

   NOTFNDCNT     A return  value of the number of  members that did not
                 exist.   This an  optional variable name  that if used
                 must be  declared as  *DEC LEN(5  0).   The intent  of
                 the  parameter  is to  allow  you  to  keep a  running
                 count  if a  series of RMVM2  commands are  used.  The
                 value is passed in on  the command and updated if  the
                 member  does not  exist.    The parameter  only  makes
                 sense if you specify IGNNOTFND(*YES).

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

Because  the command supports return  values, it may only  be used in a
CL program.

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

The following TAA Tools must be on your system:

     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
   ------        ----    ---------      ----------    ----------

   RMVM2         *CMD                   TAAMBRK       QATTCMD
   TAAMBRKC      *PGM       CLP         TAAMBRKC      QATTCL
					

Added to TAA Productivity tools May 1, 1996


Home Page Up to Top