TAA Tools
RPLDTAQ         REPLACE DATA QUEUE                     TAADTQI

The  Replace Data  Queue  command  re-creates  a data  queue  with  the
existing attributes  and authorizations.  Because data  queues may grow
to  be a large size,  re-creating the data queue  ensures the object is
reset to its base size.

A typical command would be:

             RPLDTAQ      DTAQ(DTQ1)

The data  queue DTQ1 would  be replaced  using the existing  attributes
and  authorizations.   The  existing attributes  are  retrieved by  the
RTVDTAQD TAA Tool.

By  default,  any existing  entries would  be  copied from  a non-keyed
data queue.  For  keyed data queues, the  entries cannot be copied  and
you must specify CPYENTRIES(*NO).

Only TYPE(*STD) data queues may be replaced.

You must have *ALL authority to the data queue to replace it.

The default  is OWNER(*SAME) meaning  the same  owner is retained.   If
the  owner is the group  profile of the current  user, OWNER(*SAME) may
be used.   Otherwise, you  must be the  owner or  have *ALLOBJ  special
authority to use OWNER(*SAME).

If the following is true,

        - You have *ALLOBJ special authority and
        - OWNER(*SAME) is used and
        - You are not the owner

You will retain  whatever authorities you  have to the  current version
of the object.

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

   DTAQ          The qualified  name of the data queue  to be replaced.
                 The  library  value defaults  to  *LIBL.   *CURLIB may
                 also be used.

   OWNER         Who should  be  the  owner of  the  new object.    The
                 default is  *SAME, meaning the same  owner will exist.
                 If  the  owner is  the  group profile  of  the current
                 user, OWNER(*SAME) may be  used.  Otherwise, you  must
                 be  the owner  or have  *ALLOBJ  special authority  to
                 use OWNER(*SAME).

                 *NEW  may  be specified  to  allow you  to  become the
                 owner of  the data  queue.   You  must have  the  *ALL
                 rights to the existing program to specify *NEW.

   CPYENTRIES    A  *YES/*NO value  for whether  to  copy any  existing
                 entries to  the new data queue.   *YES is the default,
                 but  may  only be  used  for a  non-keyed  data queue.
                 For   a   keyed   data   queue,   you   must   specify
                 CPYENTRIES(*NO).

                 Because  of the way  the send  and receive  data queue
                 APIs  operate,  the  same name  data  queue  cannot be
                 used during the replace process.

                 The technique  used  is  to create  a  temporary  data
                 queue in  the TAAWORK  library with the  attributes of
                 the  existing data  queue using a  name of  Xnnn where
                 nnn is  the  9  digit  value  from  the  QTIME  system
                 value.   The intent is  to provide a  temporary unique
                 name.    After  receiving  all entries  and  resending
                 them  to  the  temporary  named  data  queue,  the old
                 version is deleted,  the new version  is moved to  the
                 same  library, and the  data queue  is renamed  to the
                 original name.

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

See the previous comments.

Only  those  parameters retrieved  by  RTVDTAQD are  supported  for the
replaced data queue.

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

The following TAA Tools must be on your system:

     CHKALLOBJ       Check all object
     EDTVAR          Edit variable
     RTVDTAQD        Retrieve data queue description
     SNDCOMPMSG      Send completion message
     SNDESCMSG       Send escape message

Implementation
--------------

None, the tool is ready to use.

Objects used by the tool
------------------------

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

   RPLDTAQ       *CMD                   TAADTQI       QATTCMD
   TAADTQIC      *PGM       CLP         TAADTQIC      QATTCL
					

Added to TAA Productivity tools January 1, 1998


Home Page Up to Top