TAA Tools
SCNMSGQ         SCAN MESSAGE QUEUE                     TAAMSJS

The Scan  Message Queue  command scans,  one, generic,  or all  message
queues  in one  or  more libraries  for  up to  20  different arguments
against  the message text of the messages.   A listing is output of the
messages that match at least one of the arguments.

A typical command would be:


All message queues  in QSYS  beginning with ABC  would be converted  to
an internal  data base file  and scanned for  the string 'AVAIL'.   The
default  is to  fold the text  of the  messages into  upper case before
scanning.   Thus  any message  with  the  word 'avail'  or  'available'
would be found and listed.

Options  exist  to  prevent  folding  and  scan  for  the  string  with
additional blanks so only the word 'avail' would be found.

Only the first 256 bytes of the message text are scanned.

The QHST message queue in QSYS is bypassed.

SCNMSGQ  escape messages you can monitor for

      TAA9891    No arguments were found

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

SCNMSGQ Command parameters                            *CMD

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

                 The  library value  defaults  to  *LIBL.   A  specific
                 library,  *CURLIB, or  the special  value *ALL  may be
                 entered to mean all libraries.

                 To  scan  all message  queues  in all  libraries enter

   ARGUMENT      Up to  20 arguments of  20 bytes may  be entered.   To
                 scan  for a lower  case value,  enter the  argument in
                 quotes  and  specify  TRANSLATE(*NO).    See also  the
                 ADDBLANKS parameter.

   TRANSLATE     A  *YES/*NO  value  for   whether  to  translate   the
                 message text before scanning for the argument(s).

                 *YES is the  default which causes the  message text to
                 be folded to upper case before scanning.

                 *NO  may   be  specified  to  prevent  folding.    The
                 argument should be  entered in  lower case  surrounded
                 by  quotes  to  prevent  the  command  processor  from
                 folding the argument.

   ADDBLANKS     The  default is  0 meaning  do not  add any  blanks to
                 each argument specified.

                 Up  to 3 blanks  may be added  to each argument before
                 scanning.  The  typical reason to  add blanks is  when
                 you  are scanning  for a  word like  'add' and  do not
                 want  words like 'added' or  'additional' to be found.

   LISTMSGQS     A *YES/*NO  value  for  whether to  list  all  message
                 queues scanned even  if they do not  contain a message
                 where an argument is found.

                 *NO  is the default meaning  only those message queues
                 will be listed where an argument was found.

                 *YES may  be  specified  to list  each  message  queue
                 where  an  argument   was  not  found  and   how  many
                 messages were  scanned.  Message  queues with messages
                 containing an argument are always listed.

   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.


Only the first 256 bytes of the message text are scanned.

The QHST message queue in QSYS is bypassed.


The following TAA Tools must be on your system:

     CVTDAT          Convert date
     CVTMSGQ         Convert message queue
     EDTVAR          Edit variable
     EXTLST2         Extract list 2
     RSNLSTMSG       Resend last message
     RTVMSGQA        Retrieve message queue attributes
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message
     SNDSTSMSG       Send status message


None, the tool is ready to use.

Objects used by the tool

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

   SCNMSGQ       *CMD                   TAAMSJS       QATTCMD
   TAAMSJSC      *PGM       CLP         TAAMSJSC      QATTCL
   TAAMSJSR      *PGM       RPG         TAAMSJSR      QATTRPG

Added to TAA Productivity tools July 15, 2011

Home Page Up to Top