FTP Client Application Programming Interface (API)
This topic describes the FTP Client Application Programming Interface (API) to the z/OS® FTP client. This topic explains how to initialize the interface, how to use the interface to submit a subcommand to the client, how to retrieve results of a request, and how to terminate the interface.
- Subcommand refers to z/OS FTP client subcommands.
- Request refers to a request sent to the interface (see Sending requests to the FTP client API). A subcommand might result from a request, because a request can do the following tasks:
- Invoke a specific subcommand (on an SCMD request)
- Result in an implicit subcommand (OPEN resulting from INIT)
- Automatically generate a subcommand (QUIT sent by TERM)
- Result in no subcommand (INIT with no host name or IP address included in start parameters; TERM issued after the user has explicitly issued SCMD QUIT; GETL; or POLL)
- LOCSTAT is a subcommand. No command is sent to the server for this subcommand.
- SYSTEM is a subcommand; a SYSTEM subcommand causes the client to send a SYST command to the server.
- GET is a subcommand. A data connection establishment command (PORT, PASV, or EPSV) might be sent to the server; then a RETR command is sent to the server.
The interface to the z/OS FTP client enables a user program to send subcommands for the client to process. The user program can multitask to different instances of the interface by requesting no-wait mode when processing a subcommand. The interface also enables the user program to retrieve output that includes the messages from the client, replies from the FTP server, and other data generated as the result of the request.
The interface requires the use of an FTP Client Application Interface (FCAI) control block that is created by the user program (see FTP Client Application Interface (FCAI) control block). The FCAI is a parameter on all calls to the interface and it is used to pass information between the interface and the user program.
- FTP client API compatibility considerations
- FTP client API guidelines and requirements
- Java call formats
- COBOL, C, REXX, assembler, and PL/I call formats
- Converting parameter descriptions
- z/OS FTP client behavior when invoked from the FTP client API
- FTP Client Application Interface (FCAI) control block
- FTP Client Application Interface (FCAI) stem variables
- Sending requests to the FTP client API
- FTP client API for C functions
- FTP client API for REXX function
- Output register information for the FTP client API
- FTP client API: Other output that is returned to the application
- Prompts from the client
- FTP client API messages and replies
- Interpreting results from an interface request
- Programming notes for the FTP client API
- Using the FTP client API trace
- FTP client API sample programs