The reput command is a special variant of the put command (see "put - Send a local file") and supports the restart functionality of the FTP client.
You must ensure that the same settings are chosen for mode, type, struct and ftyp as for the aborted put call.
As with the put command, the reput command transfers a file from the local to the remote host. However, the reput command checks before starting a transfer whether the target file (file on server) already exists.
If the target file already exists, two different scenarios can be distinguished:
Execution of the reput command assumes that the file has been partially transferred and continues the transfer from the point corresponding to the current end of the target file, if the following conditions are fulfilled:
The target file is smaller and was produced later than the source file.
The FTP server supports the server commands mdtm, size and rest (see "FTP servers in BS2000") which are required for checking and positioning.
The transfer medium set is "stream" (see mode command on "mode - Change or query transfer mode").
The ftyp setting is "textbin".
The setfile setting is "datend: on, pademptyrec: off" or "datend: lbp, pademptyrec: off".
sunique is disabled.
Otherwise, the execution of the reput command corresponds to the execution of put, i.e. the source file is transferred completely.
When the command is executed the local file is not checked for correct file content or correct file attributes.
reput |
<local-file> [<remote-file>] |
<local-file>
Name of a POSIX or DMS file on the local host, which is to be transferred to the remote host.
<remote-file>
Name of a POSIX or DMS file on the remote host. If the file does not exist, it is created and the reput command behaves in the same way as the put command. If the <remote-file> operand is omitted, the name of the local file is used (in this case the name of the local file must correspond to the file naming conventions of the remote host). Uppercase letters in the local file name are converted to lowercase (see also the FTP command setcase on "setcase - Uppercase/lowercase for file names in the target system").