TAA Tools
SAVSNDL         SAVE AND SEND LIBRARY WITH FTP         TAAFTPB

The  Save and  Send  Library  with FTP  tool  is designed  to  simplify
sending  one or  more libraries  to another  i5  System.   Your objects
should  be placed in unique libraries.   The SAVSNDL command saves your
library to  a save file  and the  save file is  transmitted using  FTP.
On  the  remote system,  use  RSTSNDL (part  of  the  SAVSNDL tool)  to
restore the library.

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

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

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

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

Some FTP  connections may  hang if  either or  both of the  user ID  or
password exceeds the maximum size supported by the FTP server.

A typical command on the source system would be:

       SAVSNDL      LIB(ABC) RMTSYS(xxx) RMTUSER(uuu) RMTPWD(ppp)

By  default, a save  file by the  name of ABC  would be created  in the
TAAWORK  library on the other 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.

A user  on the remote system  can then enter 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).

RSTSNDL is  designed to work  with save files  created by SAVSNDL.   It
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.

SAVSNDL uses the TAA Tool FTP2.

SBMSAVSNDL Command
------------------

The command  SBMSAVSNDL is  intended for  use when you  want to  submit
the SAVSNDL command.

SBMJOB  can be used  to submit  the SAVSNDL  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
SBMSAVSNDL.

All  the parameters  of SAVSNDL  exist on  the SBMSAVSNDL  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 SAVSNDL  is used interactively  or SBMSAVSNDL  is used.   If SAVSNDL
is  submitted to  batch by  either SBMJOB  or SBMSAVSNDL,  the password
value does not appear in the job log of the submitted job.

Typical use of SAVSNDL 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 source system:

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

On the target system, you would enter:

             RSTSNDL       LIB(TMPTFR) DLTLIB(YES)

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

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

SAVSNDL invokes the TAA FTP2 command.

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

            DSPPFM      QTEMP/FTPOUT

If the SAVSNDL 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 i5/OS  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 SAVSNDL 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:


             SBMSAVSNDL ??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  SBMSAVSNDL  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  SAVSNDL  command  without  prompting for  the
password, you could hard code the password.

An  alternative is the RTVMSKPWD tool which  will allow you to return a
masked password.   This is more secure  than hard coding a  password in
the source, but not as good as a validation list.

SAVSNDL escape messages you can monitor for
-------------------------------------------

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

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

   LIB           Up to  300 libraries  to save and  send to  the remote
                 system.   Each  library is  saved to an  internal save
                 file and then FTPed to the remote system.

   RMTSYS        The remote system  to send to.   Either a  name or  an
                 IP  address  must  be  entered.    The  proper  TCP/IP
                 connections and configuration must exist.

                 In some  situations the name must be  in the same case
                 as its host table entry.

   RMTUSER       The name of the  user on the  remote system that  will
                 be used for  the job to  be run on the  remote system.
                 Up to 100 characters may be entered.

   RMTPWD        The  password of the  user on  the remote system.   Up
                 to 100 characters may be entered.

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

                 If SBMJOB is used  for SAVSNDL, 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   SBMSAVSNDL   command  which   removes   the
                 password from current job log.

   RMTLIB        The remote  library to  place the save  file in.   The
                 default   is  TAAWORK   which  is  the   work  library
                 provided by the  TAA Productivity Tools  product.   If
                 the save  file  does not  exist, it  will be  created.
                 If  the  save   file  exists,  it  is  cleared  before
                 writing to it.

                 If  the target library  does not exist,  the save file
                 will  be   written  to   the  users  current   library
                 (assuming the initial directory is *CURLIB).

   SAVF          The save  file name to be  used.  The default  is *LIB
                 meaning  the same name  as the library.   If more than
                 one  library  is  specified  for  the  LIB  parameter,
                 SAVF(*LIB) must be used.

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

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

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

   RSTLIB        The  library to  be  restored.   The  name may  differ
                 from the library that exists in the save file.

   SAVF          The qualified  name of the save file  to restore from.
                 The  default  is to  use the  library name  defined by
                 the  LIB parameter  as  the  save  file  name  in  the
                 TAAWORK library.

   DLTLIB        A  *YES/*NO  parameter  for   whether  to  delete  the
                 library  if it  exists.   The  default is  *NO meaning
                 the library does  not exist.  An  error will occur  if
                 the library does exist.

                 *YES may  be specified  to delete  the library  before
                 restoring  from  the save  file.   You  must  have all
                 rights to the library to be able to delete it.

   SAVFLIB       The library name  within the save  file.  The  default
                 is  *ANY meaning  that whatever  library  is found  in
                 the save file will be used.

                 *LIB  may be  specified to  mean  the library  name in
                 the  save  file  must  match  that  used  in  the  LIB
                 parameter.

                 A specific name may  be entered meaning the  name must
                 match the library found in the save file.

   DLTSAVF       A  *YES/*NO  parameter  for   whether  the  save  file
                 should  be  deleted  after  the  restore is  complete.
                 *YES is  the default  to delete  the save  file.   The
                 save  file  is   retained  if  errors  occur   on  the
                 restore.

                 *NO may be specified to retain the save file.

   RSTASPDEV     The device  name of the ASP into  which the library is
                 to be  restored.   The default  is *SAVASPDEV  meaning
                 the ASP that the library was saved from.

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

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

   RMTSYS        The  remote system  to send to.   Either a  name or an
                 IP  address  must  be  entered.    The  proper  TCP/IP
                 connections and configuration must exist.

                 In some situations  the name must be in  the same case
                 as its host table entry.

   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.

                 The  purpose of  SBMFTP2  is to  prevent the  password
                 from existing in the current job log.

                 Because  the  FTP2 command  is  submitted  by SBMFTP2,
                 the password will  not exist  in the job  log for  the
                 batch job either.

   RMTLIB        The remote  library to place  the save  file in.   The
                 default   is  TAAWORK  which   is  the   work  library
                 provided  by the  TAA Productivity Tools  product.  If
                 the save  file does  not  exist, it  will be  created.
                 If  the  save  file   exists,  it  is  cleared  before
                 writing to it.

                 If  the target library  does not exist,  the save file
                 will  be  written   to  the   users  current   library
                 (assuming the initial directory is *CURLIB).

   SAVF          The save  file name to be  used.  The default  is *LIB
                 meaning the same name as the library.

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

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

   JOB           The job  name assigned to the batch  job.  The default
                 is  SAVSNDL.  *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.

Some FTP  connections may  hang if  either or  both of the  user ID  or
password exceeds the maximum size supported by the FTP server.

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

The following TAA Tools must be on your system:

     CHKOBJ3         Check object 3
     EDTVAR          Edit variable
     FTP2            Start TCP/IP file transfer 2
     RTVSAVFD        Retrieve save file description
     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
   ------        ----    ---------      ----------    ----------

   SAVSNDL       *CMD                   TAAFTPB       QATTCMD
   RSTSNDL       *CMD                   TAAFTPB2      QATTCMD
   SBMSAVSNDL    *CMD                   TAAFTPB3      QATTCMD
   TAAFTPBC      *PGM       CLP         TAAFTPBC      QATTCL
   TAAFTPBC2     *PGM       CLP         TAAFTPBC2     QATTCL
   TAAFTPBC3     *PGM       CLP         TAAFTPBC3     QATTCL

Structure
---------

SAVSNDL     Cmd
   TAAFTPBC   CL pgm

RSTSNDL     Cmd
   TAAFTPBC2  CL pgm

SBMSAVSNDL  Cmd
   TAAFTPBC3  CL pgm
					

Added to TAA Productivity tools January 15, 2004


Home Page Up to Top