TAA Tools
CPYDTAQ         COPY DATA QUEUE                        TAADTQU

The Copy Data Queue  command copies the entries from one  data queue to
another.   Both  non-keyed  and keyed  data queues  are  supported, but
must  be of the  same type, have  the same key  length, and same sender
ID attribute.  The  entries may be added  to or replace the entries  in
the To data queue.  The QSNDDTAQ API is used.

A typical command would be:

             CPYDTAQ  FROMDTAQ(xxx) TODTAQ(yyy)

Because REPLACE(*YES) is  the default, the entries in  the TODTAQ would
first  be cleared.   The entries  would then be  copied to  the To data
queue.

CPYDTAQ escape messages you can monitor for
-------------------------------------------

      TAA9891    No entries exist in the From data queue
      TAA9892    Not all entries copied

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

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

   FROMDTAQ      The qualified  name  of  the  From data  queue  to  be
                 copied.   The  library  value defaults  to  *LIBL.   A
                 specific library or *CURLIB may also be used.

   TODTAQ        The  qualified  name  of the  To  data  queue to  copy
                 entries to.  The library  value defaults to *LIBL.   A
                 specific library or *CURLIB may also be used.

The data  queue must be at  least the same  length as the  FROMDTAQ and
be  of the same  type, key length,  and same  sender ID attribute.   If
the TODTAQ length is larger, the excess characters will be blank.

   REPLACE       A  *YES/*NO  value  for  whether  the  To  data  queue
                 should be cleared before copying entries.

                 *YES is the default to clear the data queue.

                 *NO may be specified to add to any existing entries

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

The data queues  must be the same  type (non-keyed or keyed),  have the
same key length, and same sender ID attribute.

The To data  queue must have a maximum entry  length sufficient to hold
the  entry being copied.  If  not, the entry is  not copied and CPYDTAQ
continues to copy  entries that it  can copy and  sends an escape  when
all entries have been processed.

CPYDTAQ  uses  CVTDTAQ internally  which  has  a restriction  of  9,000
bytes  for  the  entry  length.    There  are  additional  restrictions
described in the CVTDTAQ tool.

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

The following TAA Tools must be on your system:

     CHKOBJ3         Check object 3
     CLRDTAQ         Clear data queue
     CVTDTAQ         Convert data queue
     EDTVAR          Edit variable
     RSNLSTMSG       Resend last message
     RTVDTAQD        Retrieve data queue description
     SCNVARRGT2      Scan variable from the right 2
     SNDCOMPMSG      Send completion message
     SNDDIAGMSG      Send diagnostic 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
   ------        ----    ---------      ----------    ----------

   CPYDTAQ       *CMD                   TAADTQU       QATTCMD
   TAADTQUC      *PGM       CLP         TAADTQUC      QATTCL
					

Added to TAA Productivity tools April 15, 2013


Home Page Up to Top