PUt subcommand—Copy data sets to the remote host
Purpose
Use the PUt subcommand to copy data sets from your local host to the remote host.
Format
Parameters
- local_file
- Specifies the name of the file on your local host being sent to the remote host.
- foreign_file
- Specifies the name that the delivered data set is given on the remote host. If the foreign_file name is not specified, the foreign_file name is the same as the local_file name.
Restriction: If FTP
does not support directory content transfers in partitioned data sets,
it is not possible to FTP load modules.
Results:
- FTP maintains the attributes of a data set that is transmitted
between a client and a server. However, when you use the PUt subcommand,
FTP might truncate data records and you might lose data, if one of
the following occurs:
- If you are creating a new file at the server and the value of LRecl, as shown by the STAtus subcommand, is a value less than the LRecl of the transmitted data set and SENDSite subcommand has been set to OFF, then FTP truncates the transmitted data set.
- 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, then FTP truncates the transmitted data set.
- When a PUt is issued, FTP automatically sends a SIte subcommand containing record format information for the file or data set. To toggle this off, you must first issue a SENDSite subcommand. See SENDSite subcommand—Toggle the sending of site information for more detailed information.
- If the remote host already has a file with the name specified by foreign_file, the remote host overwrites the existing file. If the remote host does not have a file with the same name specified by foreign_file, the remote host creates a new file.
- When a PDS or PDSE member is transmitted, the user data associated
with the PDS member is also transferred to the directory on the target
host if the following are true:
- Data is in block or compressed data transfer mode
- Data has a representation type of EBCDIC
- Transfer is from one MVS™ directory to another
- If the remote FTP server is a z/OS® FTP server that is V1R8 or later, UNIXFILETYPE=FIFO is
configured at the remote host, and the foreign file directory is in
the z/OS UNIX file system, the following apply:
- The remote host creates a new named pipe if a file with that name does not already exist.
- The remote host appends the local file to the foreign file if the foreign file exists as a named pipe.
- The remote host rejects the transfer if the foreign file exists as a regular z/OS UNIX file.
- The remote host rejects the transfer if the storage method is store-unique. Use the SUnique subcommand to change the storage method.
- If the local file is a z/OS UNIX named pipe, the following
apply:
- You must configure UNIXFILETYPE FIFO to send data from the named pipe.
- Sending a named pipe permanently removes the data from the named pipe.
- FTP cannot read from the named pipe until another process on the client host opens the named pipe for writing. The z/OS FTP client waits up to the number of seconds specified by the FIFOOPENTIME value for another process to open the named pipe. If a process does not open the named pipe, the client fails the file transfer.
- FTP waits up to the number of seconds specified by the FIFOIOTIME value for each read from the named pipe to complete. If the client cannot read any data from the named pipe for the number of seconds specified by the FIFOIOTIME value, it fails the file transfer.
Requirements:
- To put files on the remote host with unique file names, you must have set unique storage on before issuing the PUt command. Use the SUnique subcommand to change the storage method.
- To send a data set to the remote host, you must have a defined
working directory on the remote host and write privileges to the files
in this working directory.
UPDATE authority is the minimum required for write access. To ensure that the newly created data set can be written to before the data set has been allocated and opened, FTP validates that the user ID has at least UPDATE authority. If this fails, then FTP will be able to issue a reply to the client which is indicative of the failure. If open is allowed to continue and it fails due to lack of authority, then the reply will not be as definitive.
Related topics:
- See SUnique subcommand—Changes the storage method for information about changing the storage method on the remote host.
- See Specifying data sets and files for more information about naming conventions.
- PUt can be used with the PROXy subcommand to transfer files from a host on a secondary connection to a host on a primary connection. See PROXy subcommand—Execute FTP subcommand on secondary control connections for more information.
- See UNIXFILETYPE, FIFOIOTIME, and FIFOOPENTIME statements in the using z/OS UNIX named pipes details in z/OS Communications Server: IP Configuration Reference for more information.