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


FTP return codes

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

By default, the FTP client ignores any errors that occur during a session and exits with a return code of zero. You can direct FTP to exit on error with a nonzero return code by using one of the following methods:
  • Specify the EXIT or EXIT=nn parameter on the FTP command
  • Code the CLIENTEXIT TRUE statement in the FTP.DATA file
You can use several methods to direct the FTP client to compute return codes.

When FTP is started from the FTP Callable Application Programming Interface, all elements that compose the values described below are returned to the application. These include the client error code, the server reply code, and the FTP subcommand code. The CLIENTERRCODES setting in the FTP.DATA file has no effect on the FTP Callable API. See the z/OS Communications Server: IP Programmer's Guide and Reference for detailed information about using the FTP Callable API.

The FTP client issues message EZA1735I to display the standard return code and the client error code when FTP is configured to exit on error, and an error occurs. The standard return code is described in FTP standard return codes; the client error code is described in FTP client error codes. All possible computed return codes (excluding EXIT=nn) can be derived from the information found in the message. EZA1735I is issued regardless of the type of return code or whether client error logging is in use. See FTP client error logging for more information about logging client errors.

When a critical error occurs before the client can establish its environment, FTP client initialization can exit with a return code set to client error code regardless of the type of return code requested or the EXIT=nn value.

Each subcommand has an EXIT_IF_ERROR flag. If you configure FTP to exit on error, the EXIT_IF_ERROR flag determines whether the FTP client exits when an error occurs. You can configure FTP to exit on error by using one of the following methods:
  • Specify the EXIT or EXIT=nn parameter on the FTP command
  • Code the CLIENTEXIT TRUE statement in the FTP.DATA file

See FTP subcommand codes for a list of the FTP subcommand codes and their EXIT_IF_ERROR settings.

You can use the following methods to compute return codes.
EXIT=nn
This method instructs the client to exit with a specified fixed return code for any eligible error. The EXIT parameter is specified with an equal sign (=) followed by a number in the range of 0 - 4095.
EXIT with CLIENTERRCODES FALSE (or unspecified) in FTP.DATA
This is the standard return code processing for FTP if you configure FTP to exit on error. This type of return code is described in FTP standard return codes. Some limitations of this method are:
  • The size of the return code might exceed the capacity (65536) of the SMF record type 30 subtype 4.
  • The return code issued as a batch job step completion code generally does not match the original return code.
  • The batch job step completion codes are difficult to interpret.

Because of these limitations, using one of the other available return code options is recommended. You can use this method with client error logging even if you do not configure FTP to exit on error.

See FTP client error logging for more information about logging client errors.

EXIT with CLIENTERRCODES TRUE in FTP.DATA
This method uses a list of error codes, defined in FTP client error codes, to describe different types of errors that occur within the FTP client. For example, errors returned by the server are reported in the client as FTP_SERVER_ERROR. The client error codes are the same in all environments and are easier to interpret than standard return codes, but client error codes contain less information about the cause of the error.

You can use this method with client error logging even if you do not configure FTP to exit on error. See FTP client error logging for more information about logging client errors.

EXIT with CLIENTERRCODES EXTENDED in FTP.DATA
The EXTENDED client error code is composed of an FTP client error code and an FTP subcommand code, as described in FTP client error codes extended. These return codes match in all environments, are easily interpreted, and provide more information regarding the cause of the error than the client error codes alone.

You can use this method with client error logging even if no EXIT parameter is in use. See FTP client error logging for more information about logging client errors.

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 ).