TAA Tools
CPYFRMSAVF      COPY FROM SAVE FILE                    TAASAVI

The Copy  From Save File  and the companion  command Copy to  Save File
allow  a simple means  of extracting data  from a  save file to  a data
base file and vice versa.

The  typical use of the command is when the  data needs to be used in a
data interchange format by use with media or in a network.

A typical command is entered as:

        CPYFRMSAVF    FRMSAVF(xxxx) TODBF(yyyy)

The TO  data base  file must be  created with  a record  length of  528
bytes.  This  is the standard length when dealing  with save file data.

A typical command to place the data back into a save file is:

        CPYTOSAVF     FRMDBF(yyyy) TOSAVF(xxxx)

The  CPYFRMSAVF function performs only a copy  to and from a save file.
the CPYF command cannot be used on a save file object.

The data must  be placed originally  into the save  file with a  normal
save command.   The  data can then  be copied from  the save  file with
CPYFRMSAVF.   Because the saved form of the object  is in the data base
file to  be interchanged,  it  can only  be  restored properly  if  the
system restored  on is on  the same release  or a N+  release.   If the
objects were  saved with TGTRLS(*PRV),  the objects can  be restored on
a  system  with the  N-1 release.   These  are the  same rules  as when
dealing with S/R media between systems.

Use of different releases
-------------------------

It is  possible to  save a  save file  containing objects  saved for  a
specific release  and then restore them  to a down level  system.  When
CPYFRMSAVF  runs, the default  is to check  the save file  and an error
will occur if this is the case ('the file cannot be accessed')

An option exists to  bypass this check (See  the CHECK parameter).   If
the option is taken,  the checking to ensure that  the physical file is
large enough is also bypassed.

CPYFRMSAVF command parameters                         *CMD
-----------------------------

   FRMSAVF       The  qualified  name of  the  save file  to  be copied
                 from.  The library name defaults to *LIBL.

   TODBF         The qualified  name  of  the  data  base  file  to  be
                 copied to.   The file  must be  created with a  record
                 length of  528 bytes.   It must be a  physical file of
                 type *DATA.  The library name defaults to *LIBL.

   TOMBR         The TO member to be used.  The default is *FIRST.

   REPLACE       A  *YES/*NO  value that  determines whether  the TOMBR
                 will be  cleared  before  writing any  records.    The
                 default is *YES.

   CHECK         A *YES/*NO  value for whether to check  the release of
                 the  save  file objects  and  the size  of  the output
                 file.  *YES  is the  default which  requires that  the
                 SAVF  be usable  on  the current  release and  ensures
                 that the  physical file will be  large enough to allow
                 for the save file to be converted.

                 *NO may  be  specified to  cause  the checking  to  be
                 bypassed.   A good use  of the *NO  value is when  the
                 save  file contains  save information  from  a release
                 that  is more  current than the  release CPYFRMSAVF is
                 being used on (for  example if the save file  has been
                 restored to a prior release).

CPYTOSAVF command parameters                          *CMD
----------------------------

   FRMDBF        The  qualified  name  of  the  data base  file  to  be
                 copied  from.   The  file  must have  been  created by
                 CPYFRMSAVF  or  the  equivalent.    The  library  name
                 defaults to *LIBL.

   TOSAVF        The  qualified name  of the  save file  to be  written
                 to.  The library defaults to *LIBL.

   FRMMBR        The  FROM member to be  used.  The  default is *FIRST.

   REPLACE       A *YES/*NO  value  that determines  whether  the  save
                 file  will  be cleared  before  writing  any  records.
                 The default is *YES.

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

See the  previous discussion about  restoring objects to a  system on a
different release level.

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

The following TAA Tools must be on your system:

          RTVPFA         Retrieve physical file attributes
          RTVSAVFD       Retrieve SAVF description
          SNDCOMPMSG     Send completion message
          SNDESCMSG      Send escape message
          SNDSTSMSG      Send status message

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

None, the tool is ready to use.

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

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

   CPYFRMSAVF    *CMD                       TAASAVI       QATTCMD
   CPYTOSAVF     *CMD                       TAASAVI2      QATTCMD
   TAASAVIC      *PGM           CLP         TAASAVIC      QATTCL
   TAASAVIC2     *PGM           CLP         TAASAVIC2     QATTCL
   TAASAVIR      *PGM           RPG         TAASAVIR      QATTRPG
   TAASAVIR2     *PGM           RPG         TAASAVIR2     QATTRPG

Structure
---------

CPYFRMSAVF     command
   TAASAVIC      CL pgm
      TAASAVIR     RPG pgm

CPYTOSAVF      command
   TAASAVIC2     CL pgm
      TAASAVIR2    RPG pgm
					

Added to TAA Productivity tools April 1, 1995


Home Page Up to Top