z/OS Communications Server: IP User's Guide and Commands
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


PUt subcommand—Copy data sets to the remote host

z/OS Communications Server: IP User's Guide and Commands
SC27-3662-00

Purpose

Use the PUt subcommand to copy data sets from your local host to the remote host.

Format

Read syntax diagramSkip visual syntax diagram
>>-PUt--local_file--+--------------+---------------------------><
                    '-foreign_file-'   

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
    No PDS directory information is transferred if the member is null (empty).
  • 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.
    For more information about using z/OS UNIX named pipes, see Using z/OS UNIX System Services named pipes.
  • 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:

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2013
This information center is Built on Eclipse™ ( www.eclipse.org ).