TAA Tools
CPYMSG          COPY MESSAGE                           TAAMSKC

The Copy Message  command copies one  or more messages with  a specific
message  ID from one  external message queue  to another.   The message
is  copied to  the To queue  by the use  of SNDPGMMSG.   A selection by
job, user, and  job number may  also be made.   Impromptu messages  may
not be copied.

A typical command would be:

             CPYMSG     MSGID(CPFnnnn) FROMMSGQ(ABC) TOMSGQ(DEF)

The messages in  the message queue ABC would be read.   Any message IDs
matching  the one  specified  would be  sent to  the To  Message Queue.
The original message(s) would remain in the From message queue.

If any messages have  a type of *EXCP, they  are changed to an  *ESCAPE
type.  This  does not cause an  error when sent to  an external message
queue.

Inquiry messages
----------------

Inquiry messages can be sent, but the reply message queue is lost.

CPYMSG escape messages you can monitor for
------------------------------------------

      TAA9891    No messages for the message ID exist
      TAA9892    No messages exist in the From Message Queue

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

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

   MSGID         The message ID to be copied.

   FROMMSGQ      The  qualified  name  of  the  message  queue to  copy
                 messages from.  The  library value defaults to  *LIBL.
                 *CURLIB may also be used.

   TOMSGQ        The  qualified  name  of the  message  queue  to  copy
                 messages  to.    The  messages  are  copied  by  using
                 SNDPGMMSG.    The  library  value  defaults  to *LIBL.
                 *CURLIB may also be used.

   JOB           The qualified name  of the job  to copy messages  for.
                 This is  a 3 part  parameter which acts  as additional
                 selection criteria.

                 Job name.  The default is *ALL.

                 User name.  The default is *ALL.

                 Job number.  The default is *ALL.


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

Impromptu messages may not be copied.

Inquiry messages can be sent, but the reply message queue is lost.

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

The following TAA Tools must be on your system:

     CHKOBJ3         Check object 3
     CVTMSGQ2        Convert message queue 2
     EDTVAR          Edit variable
     RSNLSTMSG       Resend last message
     RTVMSGQA        Retrieve message queue attributes
     RTVMSGTYPD      Retrieve message type description
     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
   ------        ----    ---------      ----------    ----------

   CPYMSG        *CMD                   TAAMSKC       QATTCMD
   TAAMSKCC      *PGM       CLP         TAAMSKCC      QATTCL
					

Added to TAA Productivity tools October 15, 2012


Home Page Up to Top