Transferring multiple files using the FTP client z/TPF APIs

When you are transferring multiple files to or from a remote server, it is more efficient to do so by using the same FTP client session; however, FTP client sessions cannot be shared across processes. Use the following APIs to transfer multiple files in your application:
  1. Call the tpf_ftpConnect function to connect to a remote FTP server.
  2. Optionally call the tpf_ftpGetOpts or tpf_ftpSetOpts function to get or set the file transfer options for an FTP connection.
  3. Call the tpf_ftpGet or tpf_ftpPut function to transfer files from or to a remote FTP server.
  4. Repeat the previous steps to transfer multiple files.
  5. When you have finished using the FTP session, call the tpf_ftpDisconnect function to end the session.
    Note: The z/TPF system will not automatically end idle sessions that are started by z/TPF applications.