TAA Tools
RPLLF           REPLACE LOGICAL FILE                   TAADBHA

The Replace  Logical File command  allows you to  make DDS changes  and
then specify the RPLLF command to replace an existing logical file.

A typical command would be entered as:

               RPLLF    FILE(FILEX)

RPLLF will do the following:

  **   Extract  the existing  attributes of  the file  and use  them to
       re-create the file (.e.g MAINT).

  **   Copy the existing authorities to the new file.

  **   Re-create  any  members based  on their  previous specifications
       (e.g.  the DTAMBRS parameter).

  **   Restart access path journaling if needed.

RPLLF will work successfully for:

       - Single format, single member logical files
       - Multi-member logical files
       - Multi-format logical files
       - Join logical files
       - Logical files with no members (Some restrictions exist)

RPLLF is  a pre-requisite to  the RPLPF  command which can  be used  to
replace  a  data  base  network.    RPLLF  can  be  used  for  granular
replacements of a single logical file.

RPLLF  will  not cause  any programs  to be  re-created.   If  you need
dependent programs to be re-created, see the TAA Tool RBLDBF.

Sequence of events
------------------

  **   The  logical file  is  checked  for  existence,  that  it  is  a
       logical file, that the  file is not in use,  and that the source
       exists.

  **   The  existing logical file  is renamed  to TAATMPLF in  the same
       library.  This  is necessary  to be  able to  copy the  existing
       authorities after the new file is created.

  **   The attributes of the existing file are accessed.

  **   The list of members and their attributes are accessed.

  **   The DDS  for the existing  file is found  and used to  re-create
       the file with CRTLF using the original file name.

  **   If  the file fails  to re-create,  the TAATMPLF file  is deleted
       and an appropriate message is sent.

  **   If  the file was  created, the authorizations  from the old file
       are copied to the new file.  The TAATMPLF file is deleted.

  **   Each member  from the old  file is added  with ADDLFM using  the
       attributes of the original member.

  **   If the member  cannot be added, an appropriate  message is sent.

  **   If   the  file   was  successfully   created  and   all  members
       successfully   added,   the   spooled   file   is   deleted   if
       DLTSPLF(*YES) was specified.

Special join file handling
--------------------------

When a  join file  is created  by joining  a physical  file to  itself,
ADDLFM cannot  be used with the  DTAMBRS parameter.  If  RPLLF fails on
ADDLFM and the  file is  a joined  file, RPLLF tries  the ADDLFM  again
without the  use of  the DTAMBRS parameter.   If  it is  successful, an
informational message is sent describing the action.

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

   FILE          The  qualified file  name of  the  logical file.   The
                 library  value defaults  to *LIBL.   *CURLIB  may also
                 be specified.

   DLTSPLF       Whether  the  spooled   file  created  by  the   CRTLF
                 command  should  be  deleted.   The  default  is  *YES
                 which  will cause a deletion  if the file successfully
                 creates.   If  the file  is not  created  successfully
                 (or the  member is  not added  properly), the  spooled
                 file  will  still  exist.   *NO  may  be specified  to
                 always retain the spooled file.

   OLDPHYS       The qualified  name of  the old  physical file.    The
                 default is  *SAME.   This parameter  is used by  RPLPF
                 to  allow RPLLF  to determine  how to  properly create
                 the  new logical  file.   The default  for the library
                 qualifier is  *LIBL.  *CURLIB  may also be  specified.

   NEWPHYS       The  qualified name  of the  new physical  file.   The
                 default  is *SAME.   This  parameter is used  by RPLPF
                 to allow  RPLLF to  determine how  to properly  create
                 the new  logical file.   The  default for the  library
                 qualifier  is *LIBL.   *CURLIB may  also be specified.

   JOURNAL       The qualified  name  of  the  journal  being  used  if
                 STRJRNAP is  required.   The default  is *FILE.   This
                 parameter   is   specified   by   RPLPF  only   as   a
                 performance  advantage.    If *FILE  is  specified and
                 the logical file access  path is being journaled,  the
                 information  from the  based  on physical  is used  to
                 restart  journaling.    The  default  for  the library
                 qualifier is *LIBL.   *CURLIB  may also be  specified.

   SRCARCLIB     Whether a source  archive may hold the  source for the
                 files to  be re-created.  The default  is *NONE.  This
                 refers  to  the  TAA  Tool  SRCARC  which  allows  the
                 removal of source from the source files.

                 If an  archive library  is named  and the source  does
                 not  exist in  the  source member  used  to originally
                 create  the  object,  the source  will  attempt  to be
                 copied out  of  the archive  to  the original  member.
                 If successfully  copied from  the archive,  the source
                 is used to create the file and then removed.

   OWNER         Who  the owner of the file should  be.  The default is
                 *CURRENT for the user of the command.

                 *SAME may  be  specified  to retain  the  same  owner.
                 *SAME  may only  be specified  when  the current  user
                 has *ALLOBJ special authority.

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

If  no member exists  for the logical  file, some attributes  cannot be
properly replaced.   The system  does not  provide outfile  information
for the  attributes  that are  held at  a  file level,  but pertain  to
individual  members.   The information  that  will be  dropped includes
the SHARE parameter setting and journaling of the access path.

Only  one  use of  RPLLF  should be  attempted at  a  time for  a given
library.   This is  due  to the  renaming method  where  the file  name
TAATMPLF is used.

If  multiple members  exist,  the  sequence in  which  the members  are
added to the new file may not be the same as the old version.

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

The following TAA Tools must be on your system:

     ALCTMPMBR    Allocate temporary member
     CHKACTOBJ    Check active object
     CHKAPOST     Check apostrophes
     RTVPFA       Retrieve physical file attributes
     SNDCOMPMSG   Send completion message
     SNDESCMSG    Send escape message
     SNDSTSMSG    Send status message
     SRCARC       Source archive

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

None, the tool is ready to use.

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

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

   RPLLF         *CMD                   TAADBHA       QATTCMD
   TAADBHAC      *PGM       CLP         TAADBHAC      QATTCL
   TAADBHAC2     *PGM       CLP         TAADBHAC2     QATTCL
					

Added to TAA Productivity tools April 1, 1995


Home Page Up to Top