TAA Tools
RSTSAVFOBJ      RESTORE SAVE FILE OBJECT               TAARSTH

The Restore  Save File Object  command provides  a simple solution  for
restoring  objects from  a save  file.   RSTSAVFOBJ is  a front  end to
RSTOBJ  with  fewer  parameters,  better  defaults,  and  better  error
messages.

For restoring individual members  from a save file, see  the RSTSAVFMBR
tool.

A typical command would be:

             RSTSAVFOBJ  OBJ(xxx) OBJTYPE(yyy) SAVF(zzz)

By default,  each object is restored  to the same library  it was saved
from.

A  single object,  multiple  objects, generic  objects, or  all objects
may be restored, but  must all be  the same object  type.  If you  have
multiple object types  to be restored, it  requires multiple RSTSAVFOBJ
commands.

Replacing existing objects
--------------------------

A  REPLACE  parameter  exists  that  defaults  to  *NO  which  protects
against replacing an existing object.   You must specify  REPLACE(*YES)
when dealing with generic or *ALL objects.

RSTOBJ errors
-------------

RSTOBJ will fail on the following typical kinds of situations:

  **   A file  already exists,  but the  create date/time  are not  the
       same  between  the save  file  version and  the  version in  the
       restore library.

  **   A  member already exists in  a file, but the  create date is not
       the same between  the save file version  and the version in  the
       restore library.

  **   The user  does not have  *SAVSYS special authority  and attempts
       to restore something he is not the owner of.

  **   Certain  object types (such as *DTAQ)  cannot be restored if the
       object  already  exists.    RSTSAVFOBJ  avoids  this   error  by
       deleting  the   existing  data   queues.     You  must   specify
       REPLACE(*YES).

Security considerations
-----------------------

The  RSTOBJ command is  used internally  by RSTSAVFOBJ and  has several
security restrictions.   Special  requirements  exist for  those  users
who do not have *SAVSYS special authority.

While there are exceptions  to the following statement, it  tends to be
typical  of  what will  be  seen  if the  user  does  not have  *SAVSYS
special authority:

          The  user without *SAVSYS  special authority cannot
          use RSTSAVFOBJ to  restore an  object unless he  is
          the owner of the object.

See the RSTOBJ command for specific considerations.

RSTSAVFOBJ  does  not  support  the ALWOBJDIF  parameter  supported  on
RSTOBJ.

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

   OBJ           The  object in the save  file to be  restored.  If the
                 object does  not  exist in  the restore  library,  the
                 restore will  occur normally.   If the  object exists,
                 you must specify REPLACE(*YES).

                 A  single object,  multiple objects,  generic objects,
                 or all  objects  may  be  restored,  but  only  for  a
                 single object type.

                 If a  generic object name  or *ALL  is used, you  must
                 specify REPLACE(*YES).

   OBJTYPE       The  object  type  to  be  restored.   Only  a  single
                 object  type per  command may  be restored  per use of
                 the command.

   SAVF          The  qualified  file name  of  the  save  file.    The
                 library  value defaults  to *LIBL.   *CURLIB  may also
                 be used.

   RSTLIB        The  library  to  be  restored  to.    The default  is
                 *SAVLIB which  means the  same  library the  file  was
                 saved   from.      If  *SAVLIB   is   specified,   the
                 information is extracted from the save file.

   REPLACE       A  *YES/*NO parameter  that defaults to  *NO.   If the
                 object already  exists,  *NO  prevents  replacing  the
                 object.    *YES  must  be   specified  to  replace  an
                 existing object.

                 *YES  must be specified  if a  generic object  name or
                 OBJ(*ALL) is used.

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

Several  security  restrictions exist  for  RSTOBJ.   See  the previous
discussion and the details of RSTOBJ.

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

The following TAA Tools must be on your system:

     CHKGENERC       Check generic
     CHKSAVSYS       Check *SAVSYS special authority
     DLTOBJ2         Delete object 2
     EXTLST          Extract list
     RTVSAVFD        Retrieve save file description
     SNDCOMPMSG      Send completion message
     SNDDIAGMSG      Send diagnostic 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
   ------        ----    ---------      ----------    ----------

   RSTSAVFOBJ    *CMD                   TAARSTH       QATTCMD
   TAARSTHC      *PGM       CLP         TAARSTHC      QATTCL
   TAARSTHC2     *PGM       CLP         TAARSTHC2     QATTCL
					

Added to TAA Productivity tools May 1, 1996


Home Page Up to Top