TAA Tools
RMVMSGQMS2      REMOVE MESSAGE QUEUE MESSAGES 2        TAAMSJK

The Remove  Message  Queue Messages  2 command  allows  a removal  from
one, generic,  or all message  queues of the  messages that are  past a
retention  date.  The  default is to  bypass any message  queues with a
name beginning with  Q in a  library beginning with  Q.  Other  message
queues may be specifically bypassed.

You must have *ALLOBJ special authority to use RMVMSGQMS2.

A typical  command would be to  remove messages that are  older than 60
days from user message queues:

             RMVMSGQMS2  MSGQ(*ALL/*ALL) BYPASS(*SYS)
                           RTNDAYS(60)

All  message queues beginning with the  letter Q in libraries beginning
with the  letter  Q would  be  bypassed.   The  QHST message  queue  is
always bypassed.

The RTNDAYS  parameter would  be used  to create a  date 60  days prior
from today.

All  message queues  that are  not  bypassed would  be checked  for how
many messages exist.   If some exist, the  RMVMSGQMSG command would  be
run to remove any messages that existed prior to 60 days ago.

A listing  would  be displayed  with one  line per  message queue  with
flags  set  for  whether   the  message  queue  was  bypassed,  had  no
messages, etc.

Getting started with RMVMSGQMS2
-------------------------------

It  is probably best to start with an  ENDDAT that is well in the past.
This will let  you review the message  queues and make any  adjustments
to your command such as the BYPASS parameter.

RMVMSGQMS2 escape messages you can monitor for
----------------------------------------------

      TAA9891    No message queues exist in the library.

Escape messages from based on functions will be re-sent.

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

   MSGQ          The  qualified  name  of   the  message  queue  to  be
                 processed.   A specific  name, a generic  name, or the
                 special value *ALL may be specified.

                 The library qualifier defaults  to *LIBL.  *CURLIB  or
                 *ALL may be entered.

   BYPASS        A  list  of up  to  300  message  queues that  may  be
                 bypassed.   The default is *SYS  which causes a bypass
                 if the  queue name  begins with  a Q  and the  library
                 name begins  with a Q.   The  special value *NONE  may
                 be  entered to  process  all message  queues  named in
                 the MSGQ parameter.

                 Note that there is no library qualifier.

   RTNDAYS       The  number of days  to retain messages.   The default
                 is 60  meaning that  any messages  that existed  prior
                 to  60 days  ago  would be  removed  from the  message
                 queues  that   are  processed.    The  value  must  be
                 between 0 and 8000.

   OUTPUT        How to  output  the results.    *  is the  default  to
                 display the  spooled file  if the  command is  entered
                 interactively.   The spooled file  is deleted after it
                 is displayed.

                 If the  command  is  entered in  batch  or  *PRINT  is
                 specified, the  spooled file  is output and  retained.


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

You must have *ALLOBJ special authority to use RMVMSGQMS2.

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

The following TAA Tools must be on your system:

     ADDDAT2         Add date 2
     CHKALLOBJ       Check *ALLOBJ special authority
     EDTVAR          Edit variable
     EXTLST          Extract list
     EXTLST2         Extract list 2
     RMVMSGQMSG      Remove message queue messages
     RTVMSGQA        Retrieve message queue attributes
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message

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

None, the tool is ready to use.

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

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

   RMVMSGQMS2    *CMD                   TAAMSJK       QATTCMD
   TAAMSJKC      *PGM       CLP         TAAMSJKC      QATTCL
   TAAMSJKR      *PGM       RPG         TAAMSJKR      QATTRPG
					

Added to TAA Productivity tools July 15, 2010


Home Page Up to Top