TAA Tools
SAVSNDM         SAVE AND SEND MEMBER WITH FTP          TAAFTPD

The  Save  and Send  Member  with  FTP  tool is  designed  to  simplify
sending  a  member, generic  members,  or all  members  (from the  same
file)  to  another i5  System.   Either a  source or  data file  may be
used.  The  SAVSNDM command saves  one or more members  to a save  file
and the  save file  is transmitted  using FTP.   On the  remote system,
use RSTSNDM (part of the SAVSNDM tool) to restore the member.

FTP   requires  the   proper  TCP/IP  connections   and  configuration.
SAVSNDM differs from the system SAVRSTLIB command which uses APPN.

The SAVSNDM function  is a simple  front end to  the TAA FTP2  command.
A single  member, generic members,  or all  members from the  same file
may be transferred on each command.

When  using  SAVSNDM,  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:

       SAVSNDM      FILE(fff) MBR(mmm) RMTSYS(sss) +
                      RMTUSER(uuu) RMTPWD(ppp)

By default, a  save file by  the name of the  user would be  created in
QTEMP  and sent to  the remote system  to the default  library TAAWORK.
TAAWORK  is  shipped with  the TAA  Productivity  Tools product  and is
used for temporary objects.

If  an existing  file  by  the  same  name exists  in  TAAWORK,  it  is
automatically cleared.

A  user on  the remote  system (typically  with the  same  user profile
name)  can then enter  the RSTSNDM command  (part of  the SAVSNDM tool)
to restore the member or generic members.

You must have *ALL  authority to the file to  restore to if it  exists.

A typical command would be:

            RSTSNDM

By default,  it would  restore from  the save  file in  TAAWORK by  the
same name as the current user.

RSTSNDM  is designed to  work with save  files created by  SAVSNDM.  It
can be used  with any save file  that has a  single *FILE object  saved
by the SAVOBJ command.

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

Typical use of SAVSNDM and RSTSNDM
----------------------------------

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

SAVSNDM supports  a single member,  generic members, or all  members in
the same  file for each command.  To use  the defaults, you need to use
RSTSNDM after each use of SAVSNDM.

If you need to transfer  multiple source members that are in  different
files  or are  not  generic, it  is probably  easier  to duplicate  the
members to  a transfer library and  then use a tool  such as SAVSNDL to
transfer the entire library.  RSTSNDL  can then be used to restore  the
library  on the  remote system.    CPYSRCF or  the  TAA Tool  CPYGENSRC
could then be used to copy the source to the required library.

How RSTSNDM operates
--------------------

Because RSTOBJ  will fail if the  existing file (if any)  does not have
the  same internal  identification as the  saved file,  a simulation of
RSTOBJ is used.

RSTSNDM uses  the TAA command  CVTSAVFD to create  an outfile in  QTEMP
of  the saved  object.   This allows  the determination  of  the object
name/type and library where the file was saved from.

A  check is then made as  to whether the file to  be restored exists in
the  library  requested   (RSTLIB  parameter)  and   if  the  user   is
authorized.

The save file is  restored to QTEMP using the object name  found in the
outfile.    The object  name  must  not exist  in  QTEMP  prior to  the
restore.

If the file  to be  restored exists  in the 'restore  to' library,  the
level IDs are checked to  ensure they match.  CPYF is used  to copy all
the  members from  the restored  object  in QTEMP  to the  file  in the
'restore to' library.  The file is created if it does not exist.

The  file created  in QTEMP is  deleted.  The  RSTSNDM command defaults
to delete the save file in the specified save file library.

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

SAVSNDM invokes the TAA FTP2 command.

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

            DSPPFM      QTEMP/FTPOUT

If the SAVSNDM  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 member to a  save
file,  there are  essentially no  restrictions.   The  member type  and
text are retained.

Note that the text description of the save file is lost.

Using a PDM option
------------------

A PDM option may be used to prompt for the SAVSNDM.

Use the ADDPDMOPT command:

             ADDPDMOPT    TAACMD(SAVSNDM)

This will add the SM option to your OPTFILE file.

SAVSNDM escape messages you can monitor for
-------------------------------------------

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

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

   FILE          The qualified  name of the file  to save members from.
                 The library qualifier defaults  to *LIBL.  A  specific
                 library or *CURLIB may  also be used.  The  library is
                 saved to  a save file  in QTEMP and then  FTPed to the
                 remote system.

   MBR           The  member of the  file to be  saved and transmitted.
                 A generic  member name or  the special values  *FIRST,
                 *LAST, or *ALL may also be used.

   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.

   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 SAVSNDM is entered  interactively, the password  is
                 not displayed and will not appear in the joblog.

                 If SBMJOB is  used for SAVSNDM, the password  as keyed
                 will appear  in the command prompt and  in the current
                 job log.  It will not be in the batch 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  *USER
                 meaning the same name as the current user.

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

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

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

   SAVF          The qualified name of  the save file to  restore from.
                 The default  is *USER meaning the name  of the current
                 user  on the  remote system.   The default  works well
                 if the  user has  the same  user profile  name on  the
                 source and target systems.

   RSTLIB        The  library  name  where the  restore  should  occur.
                 The default  is *SAVLIB meaning the  same library name
                 where the save occurred.

   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  may be  retained  if  errors occur  during
                 processing.

                 *NO may be specified to retain the save file.

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:

     CHKGENERC       Check generic
     CHKOBJ3         Check object 3
     CVTSAVFD        Convert save file description
     EDTVAR          Edit variable
     FTP2            Start TCP/IP file transfer 2
     RSNALLMSG       Resend all messages
     RSNLSTMSG       Resend last message
     RTVDBFA         Retrieve data base file attributes
     RTVFMT          Retrieve format
     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
   ------        ----    ---------      ----------    ----------

   SAVSNDM       *CMD                   TAAFTPD       QATTCMD
   RSTSNDM       *CMD                   TAAFTPD2      QATTCMD
   TAAFTPDC      *PGM       CLP         TAAFTPDC      QATTCL
   TAAFTPDC2     *PGM       CLP         TAAFTPDC2     QATTCL

Structure
---------

SAVSNDM     Cmd
   TAAFTPDC   CL pgm

RSTSNDM     Cmd
   TAAFTPDC2  CL pgm
					

Added to TAA Productivity tools January 1, 2007


Home Page Up to Top