The reget command is a special variant of the get command (see "get - Fetch a 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 get call.
As with the get command, the reget command transfers a file from the remote host to the local host. However, the reget command checks before starting a transfer whether the target file (local file) already exists.
If the target file already exists, two different scenarios can be distinguished:
Execution of the reget 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 which are required for checking and positioning (see "FTP servers in BS2000").
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"
runique is disabled.
Otherwise, the execution of the reget command corresponds to the execution of get, 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.
reget |
<remote-file> [<local-file>] |
<remote-file>
Name of a file on the remote host, which is to be transferred to the local host.
<local-file>
Name of a POSIX or DMS file on the local host. If the file does not exist, it is created and the reget command behaves in the same way as the get command. If the local-file operand is omitted, the name of the remote file is used (in this case the name of the remote file must correspond to the file naming conventions of the local host).