SAVRCVL         SAVE AND RECEIVE LIBRARY WITH FTP      TAAFTPC

 The Save and Receive  Library with FTP command is  designed to simplify
 receiving  a  library from  another  i5 System.    The SAVRCVL  command
 saves  the library to a save file in  QTEMP and transmits the save file
 using FTP.

 A separate  command SBMSAVRCVL  should be  used to  submit the  SAVRCVL
 command to batch (see the later discussion).

 FTP   requires  the  proper   TCP/IP  connections   and  configuration.
 SAVRCVL  differs from  the system SAVRSTLIB  command in  that TCP/IP is
 used.  SAVRSTLIB uses APPN.

 The SAVRCVL function  is a simple  front end to  the TAA FTP2  command.
 It is designed for transferring a library.

 When  using  SAVRCVL, you  must  identify  the  remote system,  a  user
 profile on that system, and the password for the profile.

 A typical command on the source system would be:

        SAVRCVL      LIB(ABC) RMTSYS(xxx) RMTUSER(uuu) PASSWORD(ppp)

 A  save file  named  ABC would  be  created in  QTEMP for  the  FTP job
 running on the remote system.   The library ABC  would be saved to  the
 save file and transmitted to bhe local system.

 By default,  a save file  by the name  of ABC would  be created  in the
 TAAWORK library on  the local system.  TAAWORK  is shipped with the TAA
 Productivity  Tools product and is used  for temporary objects.  If the
 save file already exists, it is cleared first.

 You may  then use the  RSTSNDL command  (part of  the SAVSNDL tool)  to
 restore the library.  A typical command would be:

             RSTSNDL   LIB(ABC)

 By default,  it would restore  from the ABC  save file in TAAWORK.   If
 the  ABC library  already exists,  you must  specify DLTLIB(*YES).   By
 default, the ABC save file is deleted from TAAWORK.

 RSTSNDL is designed to work  with save files created by either  SAVSNDL
 or SAVRCVL.   RSTSNDL  can be  used with  any save  file, but the  data
 within the save file must have been saved by a SAVLIB command.

 RSTSNDL  does not have  all the parameters  of the RSTLIB  command.  If
 you need the additional function, use the RSTLIB command.

 SAVRCVL uses the TAA Tool FTP2.

 SBMSAVRCVL Command
 ------------------

 The command SBMSAVRCVL  is intended  for use  when you  want to  submit
 the SAVRCVL command.

 SBMJOB can  be used  to submit the  SAVRCVL command,  but the  value of
 the  RMTPWD parameter  is left  in the  job log  of  the user  that did
 SBMJOB.   To avoid  leaving the password  in the clear,  you should use
 SBMSAVRCVL.

 All the  parameters of  SAVRCVL exist  on the  SBMSAVRCVL command  plus
 the  JOB, JOBD,  and JOBQ  parameters.   The additional  parameters all
 have default values.

 The password  value does not appear in the  job log of the current user
 if SAVRCVL is  used interactively or  SBMSAVRCVL is used.   If  SAVRCVL
 is submitted  to batch  by either  SBMJOB or  SBMSAVRCVL, the  password
 value does not appear in the job log of the submitted job.

 Typical use of SAVRCVL and RSTSNDL
 ----------------------------------

 The  need  to transfer  objects  between systems  is  a  fairly typical
 requirement.   In many  cases, the  objects to  be transferred  may  be
 part of  a large library,  but only a  few need to  be replaced  on any
 one transfer.

 This  can be accomplished  by having work  libraries on the  source and
 target  system such as  TMPTFR.  You would  perform the following steps
 on the target system:

              CLRLIB        LIB(TMPTFR)
              MOVOBJ        ... TOLIB(TMPTFR)

 On the local system, you would enter:

              RSTSNDL       LIB(TMPTFR)

 By using the  defaults, a save  file by the  name of TMPTFR  is created
 in  QTEMP  library  of  the  job  running  on  the  target  system  and
 transferred  to the  local system.   It  is placed  (by default  in the
 TAAWORK) library.

 On the local system, you would enter:

              RSTSNDL       LIB(TMPTFR)

 This would  restore the TMPTFR  library from  the TMPTFR  save file  in
 TAAWORK and then delete the save file.

 You would  then enter  the commands to  move or  copy the  objects from
 TMPTFR to the large library.

 Error handling
 --------------

 SAVRCVL invokes the TAA FTP2 command.

 FTP2  provides  for a  log  of  the FTP  operations.    If the  SAVRCVL
 command is run interactively, the log may be displayed using:

             DSPPFM      QTEMP/FTPOUT

 If the SAVRCVL command is  run in batch, a spooled  file of the log  is
 created.

 Why is a save file used
 -----------------------

 FTP only sends files.   Therefore, other object types  such as programs
 or data areas  cannot be sent directly.  By saving  a library to a save
 file, there are essentially no restrictions.

 If  FTP is used  to send a  file, the unique  AS/400 attributes will be
 lost.   This  includes such  attributes  as the  text  of the  file  or
 members and  the source type.   These problems are avoided  by saving a
 library to a save file.

 Note  that the text description of  the save file is  lost, but not the
 attributes of the objects within the save file.

 Using a CL program
 ------------------

 A CL program may be used to  include one of the SAVRCVL commands.   The
 disadvantage of  this approach is that  you must include  your password
 in the source.

 If  you are going  to call the  program in an  interactive session, you
 could use the selective prompting function such as:

              SBMSAVRCVL ??LIB(x) ?*RMTSYS(y) ?*RMTUSER(z) +
                           ??RMTPWD()
              MONMSG     MSGID(CPF6801) EXEC(DO) /* User cancelled */
                         /* Your code for cancel */
              ENDDO      /* User cancelled */

 When the  CL  program  is  run, the  SBMSAVRCVL  command  prompt  would
 appear with  the values  as specified  and you must  enter a  password.
 The other parameters on the command (eg TGTRLS) would not appear.

 The selective prompting functions are as follows:

    ??LIB(x)      The prompt  appears with the library name,  but can be
                  changed.

    ?*RMTSYS(y)   The  prompt appears  with the  remote system  name and
                  cannot be changed.

    ?*RMTUSER(z)  The  prompt appears  with  the  remote user  name  and
                  cannot be changed.

    ?*RMTPWD()    The prompt appears and must be entered.

 If  you  want  to run  a  SAVRCVL  command  without prompting  for  the
 password,  you could hard code  the password or use  a validation list.
 A validation list allows  you to store an  encrypted password.  An  API
 will allow you to retrieve the password as a variable.

 SAVRCVL escape messages you can monitor for
 -------------------------------------------

       TAA9877    FTP failed - see the log

 Escape messages from based on functions will be re-sent.

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

    LIB           The library on  the remote system to save  and send to
                  the  local  system.    The  library  is  saved  to  an
                  internal  save  file  and  then  FTPed  to  the  local
                  system.

    RMTSYS        The remote  system which has  the library to  be saved
                  and  received.  Either  a name  or an IP  address must
                  be   entered.    The  proper  TCP/IP  connections  and
                  configuration must exist.

    RMTUSER       The name of  the user on  the remote system that  will
                  be used  for the job to  be run on  the remote system.

    RMTPWD        The password of the user on the remote system.

                  If  SAVRCVL is entered  interactively, the password is
                  not displayed and will not appear in the joblog.

                  If SBMJOB is used for  SAVRCVL, the password as  keyed
                  will appear will  appear in the command  prompt and in
                  the  current job  log.   It will not  be in  the batch
                  job log.

                  See  the   SBMSAVRCVL   command  which   removes   the
                  password from current job log.

    LCLSAVF       The  save file  to  be created  on  the local  system.
                  The  default file  name is  is  *LIB meaning  the same
                  name  as  the  library  on  the  remote  system.   The
                  default library is TAAWORK.

    TGTRLS        The target  release to  save  the library  for on  the
                  remote system.  The default is *CURRENT.

                  Use the  prompter to see  the other values  which have
                  the  same   definition  as  the  TGTRLS  parameter  on
                  SAVLIB.

                  If the  target  system  is  at the  same  or  a  lower
                  release,  you may  take  the default  and  be able  to
                  transmit  and restore properly.   For  example, if the
                  target system is on  V5R2 and the  local system is  on
                  V5R3, the default may be used.

                  However, if the  target system is at a  higher release
                  you may must specify a value.

                  For  example, if  the target  system  was on  V5R3 and
                  the  local  system  is  on V5R2,  you  must  specify a
                  value such as  *PRV or V5R2M0.   You must ensure  that
                  all objects  in the library to be  transferred will be
                  restorable  to the release of the  local system.  Most
                  non-program objects  (such as  data base  files)  will
                  be  restorable, but  programs must  have been  created
                  with the appropriate TGTRLS parameter.

    UPDHST        A  *YES/*NO  parameter for  whether  the  save history
                  information should be  updated.  The  default is  *NO.

                  *YES  may be  specified  to  update the  save  history
                  information.

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

    LIB           The library  on the remote system to  save and send to
                  the  local  system.    The  library  is  saved  to  an
                  internal  save  file  and  then  FTPed  to  the  local
                  system.

    RMTSYS        The remote  system which has  the library to  be saved
                  and  received.   Either a name  or an  IP address must
                  be  entered.    The  proper  TCP/IP  connections   and
                  configuration must exist.

    RMTUSER       The name  of the user on  the remote system  that will
                  be  used for the job  to be run on  the remote system.

    RMTPWD        The password of the user on the remote system.

                  If SAVRCVL is entered  interactively, the password  is
                  not displayed and will not appear in the joblog.

                  If SBMJOB is  used for SAVRCVL, the password  as keyed
                  will appear  will appear in the command  prompt and in
                  the  current job  log.   It will  not be in  the batch
                  job log.

                  See  the   SBMSAVRCVL   command  which   removes   the
                  password from current job log.

    LCLSAVF       The  save file  to  be created  on  the local  system.
                  The  default file  name  is is  *LIB meaning  the same
                  name  as the  library  on  the  remote  system.    The
                  default library is TAAWORK.

    TGTRLS        The  target release  to save  the library  for on  the
                  remote system.  The default is *CURRENT.

                  Use  the prompter to  see the other  values which have
                  the  same  definition  as  the  TGTRLS  parameter   on
                  SAVLIB.

                  If  the target  system  is  at  the same  or  a  lower
                  release,  you may  take  the  default and  be  able to
                  transmit  and restore  properly.  For  example, if the
                  target system is  on V5R1 and  the local system is  on
                  V5R2, the default may be used.

                  However, if  the target system is at  a higher release
                  you may must specify a value.

                  For  example, if  the  target system  was on  V5R2 and
                  the local  system  is  on  V5R1, you  must  specify  a
                  value such  as *PRV or V5R1M0.   You must  ensure that
                  all objects  in the library to  be transferred will be
                  restorable to the release of  the local system.   Most
                  non-program objects  (such  as data  base files)  will
                  be  restorable, but  programs must  have  been created
                  with the appropriate TGTRLS parameter.

    UPDHST        A  *YES/*NO  parameter  for whether  the  save history
                  information should be  updated.   The default is  *NO.

                  *YES  may  be specified  to  update  the save  history
                  information.

    JOB           The  job name assigned to the  batch job.  The default
                  is SAVRCVL.  *JOB may  be entered to mean the name  of
                  the job description used.

    JOBD          The  qualified  name  of  the job  description.    The
                  default   is  *USRPRF  meaning   the  job  description
                  assigned to the current user profile.

                  If a specific  job description is  entered, a  library
                  qualifier may be  entered or the special  values *LIBL
                  or *CURLIB.

    JOBQ          The qualified  name of the job queue to  be used.  The
                  default  is *JOBD  meaning the  job queue  defined for
                  the   job   description   specified   for   the   JOBD
                  parameter.

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

 The proper TCP/IP connections and configuration must exist.

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

 The following TAA Tools must be on your system:

      CHKOBJ3         Check object 3
      EDTVAR          Edit variable
      FTP2            Start TCP/IP file transfer 2
      RTVDAT          Retrieve date
      SNDCOMPMSG      Send completion message
      SNDESCINF       Send escape information
      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
    ------        ----    ---------      ----------    ----------

    SAVRCVL       *CMD                   TAAFTPC       QATTCMD
    SBMSAVRCVL    *CMD                   TAAFTPC2      QATTCMD
    TAAFTPCC      *PGM       CLP         TAAFTPCC      QATTCL
    TAAFTPCC2     *PGM       CLP         TAAFTPCC2     QATTCL

 Structure
 ---------

 SAVRCVL     Cmd
    TAAFTPCC   CL pgm

 SBMSAVRCVL  Cmd
    TAAFTPCC2  CL pgm  - Submits the SAVRCVL command to batch

Added to TAA Productivity Tools March 31, 2004


Home Page

Powered by AS/400Powered by AS/400 Last modified on October 10, 2008 © 1995, 2008 - Jim Sloan, Inc.