Purpose
Use the APpend subcommand to append
a local data set to a remote host.
Format
>>-APpend--local_data_set--destination_file--------------------><
Parameters
- local_data_set
- The name of the data set on your local host to be appended.
- destination_file
- The name of the file on the remote host to which your data set
is appended. If the destination file does not already exist at the
remote host, a new file is created. If the server is a z/OS UNIX server,
the local file can be appended to a z/OS® UNIX file or an MVS™ data set.
Examples
In the following example, an FTP command is issued from MVSXA2
to MVSXA3. MVSXA2 has a data set MVSUSER.FTP.EXAMPLE with one member.
The member, APPEND01, contains:
;
; THIS FILE ORIGINALLY RESIDED IN MVSXA2, AND
; WILL BE APPENDED TO A FOREIGN FILE IN MVSXA3.
;
MVSXA3 has a data set, MVSUSER.FTP.EXAMPLE, with
one member, APPEND02. The member contains:
;
; THIS FILE ORIGINALLY RESIDED IN MVSXA3, AND
; WILL BE USED TO RECEIVE ANOTHER FILE FROM MVSXA2.
;
User: append
System: Usage: APPEND localfile foreignfile
Command:
User: lpwd
System: Local directory is MVSUSER.
Command:
User: append 'mvsuser.ftp.example(append01)' 'mvsuser.ftp.example(append02)'
System: >>>SITE FIXrecfm 128 Lrecl=128 Recfm=FB BlockSize=6144
200 Site command was accepted
>>>PORT 1,1,2,2,4,16
200 Port request OK.
>>>APPE 'mvsuser.ftp.example(append02)'
125 Appending to data set MVSUSER.FTP.EXAMPLE(APPEND02)
250 Transfer completed successfully.
520 bytes transferred in 1.100 seconds.
Transfer rate 0.47 Kbytes/sec.
Command:
Results: - The following information applies when the local_data_set value is a named pipe in the z/OS UNIX file system:
- FTP cannot send the named pipe until you start a process on the
client host to write to the named pipe. If FTP is the first process
to open the named pipe, it blocks until another process opens the
named pipe for writing, or until the FIFOOPENTIME timer expires.
- Appending a named pipe to a remote file permanently removes data
from the named pipe in the FTP client file system.
- FTP maintains the attributes of a data set that is transmitted
between a client and a server. However, when you use the APpend subcommand,
FTP can truncate data records and you might lose data. If the data
set name already exists at the receiving site and the logical record
length (LRecl) of the data set at the receiving site is less than
the LRecl of the transmitted data set, FTP truncates the transmitted
data set.
- If the remote host is an MVS or VM host, and if the data set on the remote host has a fixed-record
format, the format and record length of the data set on the remote
host are always preserved.
- Records from the data set on your local host are truncated or
padded with blank spaces when necessary.
- To append to a file on a remote host, you must define a working
directory on that host, and you must have write privileges to the
files in that directory.
- The z/OS FTP Server does not request that unused space be released
from a data set created during APPEND processing. If you are using
the z/OS FTP Server and want the Server to request that unused space be
released on a newly-created data set, use the PUT subcommand instead
of APPEND.