TAA Tools
CVTMSGQ2        CONVERT MESSAGE QUEUE 2                TAAMSIV

The Convert Message Queue  2 command converts the messages  found in an
external message  queue (such as QSYSOPR) to an  outfile.  This differs
from  the CVTMSGQ tool  in that the  open list QGYOLMSG  API is used to
allow a  very large  number of  messages  to be  converted.   Selection
criteria allows  different types  of messages to  be converted  as well
as a start date and time.

SELECT(*PAR)  is  not  directly supported  by  CVTMSGQ2  but  rather is
handled by CVTMSGQ.   CVTMSGQ2 transfers control  to CVTMSGQ to do  the
processing.

The  same outfile  as used  by  CVTMSGQ is  used.   The  model file  is
TAAMSHOP with a format name of MSGLSTR.

A typical command would be:

             CVTMSGQ2      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 which is  the
same as that use by CVTMSGQ.

Differences with CVTMSGQ
------------------------

The number of  messages that may  be converted by CVTMSGQ  is dependent
on  the message text  length and  the 16MB  limit of a  *USRSPC object.
The  CVTMSGQ2  tool  uses the  QGYOLMSG  API  to retrieve  the  list of
messages from  a 2GB area  and a  second API  to access the  individual
messages  information (such as  text).   This should  result in  a much
larger number of messages which can be converted.

The  APIs used  by CVTMSGQ2  do not provide  information for  the MQMOD
(module) and MQPROC (procedure fields).

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

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 *FIRST 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 DSPMSGTYP
                 command.

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

The command may not be used for the QHST message queue.

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

The following TAA Tools must be on your system:

     CHKOBJ3         Check object 3
     CHKTIM          Check time
     CVTMSGQ         Convert message queue
     DUPFILFMT       Duplicate file format
     EDTVAR          Edit variable
     EXTLST          Extract list
     EXTLST2         Extract list 2
     RTVMSGQA        Retrieve message queue attributes
     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
   ------        ----    ---------      ----------    ----------

   CVTMSGQ2      *CMD                   TAAMSIV       QATTCMD
   TAAMSIVC      *PGM       CLP         TAAMSIVC      QATTCL
   TAAMSIVR      *PGM       RPG         TAAMSIVR      QATTRPG

The  same  TAAMSHOP file  used  for  the  CVTMSGQ outfile  is  used  by
CVTMSGQ2.
					

Added to TAA Productivity tools September 15, 2006


Home Page Up to Top