TAA Tools
DSPEMTMSGQ      DISPLAY EMPTY MESSAGE QUEUE            TAAMSJM

The Display Empty  Message Queue command  displays one or  more message
queues that have  no messages.  A flag may be  set if the message queue
has  not been  changed in  the last  n days.   Sending  a message  to a
message queue causes the change date  of the object to be changed.   An
option  exists  to display  all  message  queues.   DSPEMTMSGQ  can  be
helpful in cleaning up unused message queues.

You  must have  *ALLOBJ  special authority  to use  a library  value of
*ALL or *ALLUSR.

A typical command would be:

             DSPEMTMSGQ   MSGQ(*ALLUSR/*ALL) FLAGDAYS(100)
                            OMITLIB(QUSRSYS)

All message  queues in user  libraries that  do not  have any  messages
would be  listed.  Since  the system creates  a message queue  for each
user  in QUSRSYS, this  library has been  omitted.  Any  message queues
that have not been changed in the last 100 days would be flagged.

DSPEMTMSGQ escape messages you can monitor for
----------------------------------------------

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

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

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

                 The  library  value defaults  to  *LIBL.   A  specific
                 library,  *CURLIB, *USRLIBL,  *ALL, or  *ALLUSR may be
                 entered.

   FLAGDAYS      The number  of days to  flag the  message queue if  it
                 has not  been changed.  The  default is 60 days.   The
                 value must be in a range of 0-999.

                 A  message queue  is considered  changed if  a message
                 is sent  to  the queue.    Using  a value  provides  a
                 better indication of what is being used.

   ALLMSGQ       Whether to list  all message queues regardless  of the
                 number of messages.

                 *NO  is the default  to list only  message queues with
                 no messages.

                 *YES may be specified to list all message queues.

   OMITLIB       Up to  300  libraries  may be  omitted  meaning  if  a
                 message  queue exists  in an  omitted  library, it  is
                 not processed.

                 *NONE  is   the  default  meaning   no  libraries  are
                 omitted.

                 Since  the system  creates a message  queue in library
                 QUSRSYS  for  each  user  profile  that   is  created,
                 omitting QUSRSYS  should normally be used  if the MSGQ
                 library  qualifier  is *ALL  or *ALLUSR.    QUSRSYS is
                 considered to be a 'user' library.

   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  a library  value of
*ALL or *ALLUSR.

Sending  a message to a  message queue does not  change the change date
of the object.

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

   DSPEMTMSGQ    *CMD                   TAAMSJM       QATTCMD
   TAAMSJMC      *PGM       CLP         TAAMSJMC      QATTCL
   TAAMSJMR      *PGM       RPG         TAAMSJMR      QATTRPG
					

Added to TAA Productivity tools October 15, 2010


Home Page Up to Top