TAA Tools
CVTMSGQ         CONVERT MESSAGE QUEUE                  TAAMSHO

The Convert  Message Queue command  converts the  messages found in  an
external  message queue  (such as  QSYSOPR) to  an outfile.   Selection
criteria  allows different  types of messages  to be  converted as well
as a  start date  and time.   The  API QMHLSTM  is used  to access  the
messages.

A typical command would be:

             CVTMSGQ       MSGQ(xxx) SELECT(*ALL) OUTLIB(QTEMP)

All  messages in  the named  message queue  would be  converted  to the
MSGLSTP file in the described library.

The model file is TAAMSHOP with a format name of MSGLSTR.

See  also the  CVTMSGQ2 tool  which will  allow for  a large  number of
messages to be converted.

Selection criteria
------------------

Different types of  selection criteria  are offered.   You may  specify
one  or  more  of  the  types.   Any  specified  criteria  are  'anded'
together.

   SELECT        The  message selection to  be performed.   The default
                 is *ALL.   You  may specify  such values  as *MNR  for
                 all  unanswered  inquiry messages.    See  the  SELECT
                 parameter.

   STRDAT        The start  date of the  messages to be  selected.  The
                 default  is *BEGIN which  means any date  after Jan 1,
                 1940.   *TODAY  may be  entered  to mean  the  current
                 date.  If entered, the date must be in job format.

   STRTIM        The start  time of the  messages to be selected.   The
                 default  is  *AVAIL  which means  any  message  on the
                 specified date.  If entered,  the time must be in  the
                 format of HHMMSS.

   MSGTYPE       The message type  to be selected.   A list of up  to 7
                 message  types may be  selected.  The  default is *ALL
                 for any message type.

   SEV           The minimum  severity  of  messages  to  be  selected.
                 The default is 00 for any severity.

   MSGID         The  message IDs  to  select.    The default  is  *ALL
                 meaning all  message IDs are  selected including those
                 messages  without a message ID.   Up to 40 message IDs
                 may be  entered.  If  entered, only  message IDs  that
                 match the list will be selected.

TAACVTMSGQ Data Area in QTEMP
-----------------------------

The command  creates the  TAACVTMSGQ data area  in QTEMP with  the date
and  time of  the first and  last messages  written to  the outfile and
the number  of messages written.   This  allows a  program to  retrieve
the information  so that  the next use  of the command  can start  at a
specific point.

The data area is 200 bytes in length and has a format of:

      1 - 7     Date of first message converted - CYYMMDD format
     11 - 16    Time of first message converted - HHMMSS format
     51 - 57    Date of last message converted - CYYMMDD format
     61 - 66    Time of last message converted - HHMMSS format
    101 - 107   Count of messages converted

For  example, a program could  periodically wake up and  use CVTMSGQ to
access specific messages.   Rather  than processing all  messages in  a
message queue such  as QSYSOPR, the  command could start at  either the
first  or  last  message   converted.    The  program  could  begin  by
accessing  the  information in  the data  area  to determine  the start
date and time that should be used on the CVTMSGQ command.

If no messages are converted,  the date and time values will  be blank.

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

   MSGQ          The  qualified  name  of   the  message  queue  to  be
                 converted.    The  library  value  defaults to  *LIBL.
                 *CURLIB may also be used.

   SELECT        The message selection  to be  performed.  The  default
                 is *ALL to select all messages.

                 *NEEDRPY  may be  used to  convert unanswered  Inquiry
                 messages  (those needing a  reply).   This converts to
                 *MNR when the API is used.

                 *NOTNEEDRPY  may  be  used  to  convert  messages  not
                 requiring  a  reply.     This  includes  informational
                 messages,  completion  messages, etc.    This converts
                 to *MNNR when the API is used.

                 *PAR  may  be  used  to  convert  messages  that  have
                 problem analysis.

                 *SCNR may be used  to convert the senders copy  of any
                 unanswered messages requiring a reply.

                 A  message must be  selected by  all of  the selection
                 parameters in order to convert it.

   STRDAT        The  start date of  the messages to be  selected.  The
                 default is *BEGIN  which means any  date after Jan  1,
                 1940.  If entered, the date must be in job format.

                 A message  must be  selected by  all of  the selection
                 parameters in order to convert it.

   STRTIM        The  start time of the  messages to be  selected.  The
                 default is *AVAIL  which means the  first message  for
                 the day.  If  entered, the time must be  in the format
                 of HHMMSS.

                 A  message must be  selected by  all of  the selection
                 parameters in order to convert it.

   MSGTYPE       The  message type to be  selected.  A list  of up to 7
                 message types may  be selected.   The default is  *ALL
                 for any message type.

                 For a  complete list of the message  types, prompt for
                 the  value.  For a list  of the codes and descriptions
                 that will  appear  in  the  outfile,  use  the  RCVMSG
                 command and  request help  for the  RTNTYPE parameter.

                 A  message must  be selected by  all of  the selection
                 parameters in order to convert it.

   SEV           The minimum  severity  of  messages  to  be  selected.
                 The default is 00 for any severity.

                 A message  must be  selected by  all of the  selection
                 parameters in order to convert it.

   MSGID         The  message  IDs  to select.    The  default is  *ALL
                 meaning  all message IDs  are selected including those
                 messages without a message  ID.  Up to 40  message IDs
                 may  be entered.   If entered,  only message  IDs that
                 match the list will be selected.

                 A  message must  be selected  by all of  the selection
                 parameters in order to convert it.

   OUTLIB        The library  to be  used for  the MSGLSTP  file.   The
                 default is  *LIBL.  A  specific library must  be named
                 if the MSGLSTP file cannot be found.

   OUTMBR        The  member to  be  used for  the MSGLSTP  file.   The
                 default is MSGLSTP.

   REPLACE       A YES/*NO value  for whether  to replace  the data  if
                 an existing  MSGLSTP  file is  used.   The default  is
                 *YES to replace data.

                 *NO  may  be specified  to  add  data  to an  existing
                 member.

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

None.

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

The following TAA Tools must be on your system:

     CHKTIM          Check time
     CHKOBJ3         Check object 3
     DUPFILFMT       Duplicate file format
     EDTVAR          Edit variable
     EXTLST2         Extract list 2
     RTVSYSVAL3      Retrieve system value 3
     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
   ------        ----    ---------      ----------    ----------

   CVTMSGQ       *CMD                   TAAMSHO       QATTCMD
   TAAMSHOC      *PGM       CLLE        TAAMSHOC      QATTCL
   TAAMSHOR      *PGM       RPGLE       TAAMSHOR      QATTRPG
   TAAMSHOP      *FILE      PF          TAAMSHOP      QATTDDS
   TAAMSHOQ      *FILE      PF

The  data area  TAACVTMSGQ will  exist in QTEMP  for the  job that runs
CVTMSGQ.

The TAAMSHOQ file is created from the TAAMSHOP source.
					

Added to TAA Productivity tools January 1, 1999


Home Page Up to Top