IBM AS/400e Computer Hardware User Manual


 
AS/400-to-AS/400
This example shows how to transfer physical file members to and from another
AS/400.
Put a File:
The FTP subcommand PUT is used to copy a local file member into a
file at the remote host.
To copy a local file member into a file at the remote host, you need write authority
for the library where the file is put. A library at the AS/400 system is a logical
placeholder for other objects such as programs, files, and commands. A library can
be compared to a directory on other systems.
The syntax of the PUT subcommand is as follows:
PUT localfile [remotefile]
The remotefile is optional. If omitted, the current library (or current directory for
QDLS objects) on the remote AS/400 is used with the file having the same name.
You can change the current library or directory on the remote AS/400 with the CD
subcommand.
For the AS/400 system, the syntax of a file name, using NAMEFMT 0 is:
library/file.member
For the AS/400 system, the syntax of a file name, using NAMEFMT 1 is:
/QSYS.LIB/libname.LIB/filename.FILE/mbrname.MBR
This refers to the same file as the NAMEFMT 0 example above.
On the AS/400 system, files may have one or more members. Each file member
can consist of data records, or each may contain other records such as source
programs or database definitions.
An example of the PUT subcommand is shown in Figure 151, below.
The PUT subcommand copies the file member SCRNCPY in file SCRNCPY in
library ITSOTST1 at the local host to member SCRNCPY in file SCRNCPY in library
ITSOTST2 on the remote system. If the member already exists at the remote host,
the remote system will overwrite the existing member.
File Transfer Protocol
> put ITSOTST1/scrncpy.scrncpy itsotst2/scrncpy.scrncpy
200 PORT subcommand request successful.
150 Sending file to member SCRNCPY in file SCRNCPY in library ITSOTST2.
250 File transfer completed successfully.
286412 bytes transferred in 12.595 seconds. Transfer rate 22.741 KB/sec.
Enter an FTP subcommand.
===> put ITSOTST1/scrncpy.scrncpy itsotst2/scrncpy.scrncpy
F3=Exit F6=Print F9=Retrieve
F17=Top F18=Bottom F21=CL command line
Figure 151. FTP PUT Display
Chapter 7. File Transfer Protocol (FTP) Client 245