TAA Tools
RSTSAVFMBR      RESTORE SAVE FILE MEMBER               TAARSTG

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

For restoring other object types  from a save file, see  the RSTSAVFOBJ
tool.

A typical command would be:

             RSTSAVFMBR  FILE(xxx) MBR(yy1 yy2) SAVF(zzz)

By  default, each  member  is restored  to  the same  file and  library
where it was saved from.

A  single member,  multiple  members, generic  members, or  all members
may be restored from one file.   If you have members in multiple  files
to be restored, it requires multiple RSTSAVFMBR commands.

Replacing existing members
--------------------------

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

Typical uses
------------

There are  two typical  applications with  the use  of save  files  for
source members:

  **   Saving space  for seldom used  source files.   Source files  can
       take up  a significant amount  of space.   If you have  a source
       file  that you occasionally need to  access for 'read only' use,
       using a save file can be a significant space saver.

       Note that this technique  works well for 'read  only' functions.
       If  you need to  update a  single member,  you cannot  replace a
       single member  in the save file.  You  would need to copy all of
       the members out of the save  file, make a change, and then  save
       the entire source file again.

       If you  have a need for  occasional update, you  should consider
       the  SRCARC  tool  which  provides  the  same  or  better  space
       savings,  allows  multiple  versions  of  backup,  restoring  an
       archived  version,  and  provides for  a  single  member  to  be
       replaced.

  **   On line  backup.  Backing up  your source on a  nightly basis to
       a   save  file  can  be   an  effective  technique  in  allowing
       programmers  to recover  last  nights  version  when  they  have
       accidentally  deleted the  source  or want  to  recover to  last
       nights  version.  The on line save  file avoids the need to have
       to mount tapes to recover.

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

RSTOBJ will fail on the following typical kinds of situations:

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

  **   The member  already exists, 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.

How to avoid typical errors
---------------------------

In a typical  situation where you want to save  space for a seldom used
source  file or files, you  would normally backup the  source to a save
file and then delete the source files.

  **   Instead  of  deleting the  source  files,  use  RMVM  MBR(*ALL).
       This  will keep  the create  date of  the source  file  in synch
       with the version in the save file.

  **   If  you have deleted the source file  or prefer to delete it, do
       not use CRTSRCPF to  re-create it.  Use  RSTSAVFMBR and let  the
       system  restore function  create the  file  so that  it has  the
       same original create date.

  **   Do not  attempt to add a member to  the source file that already
       exists in  the  save  file  with  SEU  or  ADDPFM.    This  will
       automatically cause a mismatch  of dates and prevent the  use of
       RSTSAVFMBR.  Instead, use RSTSAVFMBR to add the member.

If   you  do  not   have  *SAVSYS   special  authority,  you   will  be
predominantly  limited to save files and  source files that you are the
owner of.  See the next section.

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

The RSTOBJ  command is used  internally by  RSTSAVFMBR 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  RSTSAVFMBR to  restore a  member unless  he is
          the owner of the file.

See the RSTOBJ command for specific considerations.

RSTSAVFMBR does  not  support  the  ALWOBJDIF  parameter  supported  on
RSTOBJ.

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

   FILE          The file  in the  save file  to be restored.   If  the
                 file  does  not  exist  in  the restore  library,  the
                 restore  will  create the  file  and then  restore the
                 appropriate members.    If the  file  does exist,  the
                 members will be restored.

   MBR           The  member to be  added.   A single  member, multiple
                 members  (up  to 40),  generic member  names,  or *ALL
                 members may be restored for the named file.

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

   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
                 member  already exists,  *NO  prevents  replacing  the
                 member.    *YES  must   be  specified  to  replace  an
                 existing member.

                 *YES  must be  specified if  a generic member  name or
                 MBR(*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
     CHKMBR2         Check member 2
     CHKSAVSYS       Check *SAVSYS special authority
     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
   ------        ----    ---------      ----------    ----------

   RSTSAVFMBR    *CMD                   TAARSTG       QATTCMD
   TAARSTGC      *PGM       CLP         TAARSTGC      QATTCL
					

Added to TAA Productivity tools May 1, 1996


Home Page Up to Top