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


INIT request

z/OS Communications Server: IP Programmer's Guide and Reference
SC27-3659-02

Format

Read syntax diagramSkip visual syntax diagram
>>-ftpapi--(--stem--,--'init'--+---------------+--+---------------+--)-><
                               '-,--initString-'  | .-----------. |      
                                                  | V           | |      
                                                  '---,--envVar-+-'      

Purpose

Initializes a new instance of the FTP client API.

Parameters

stem
The name of a stem used to return the FTP client environment. The stem must have been passed on a prior successful CREATE function call.
'init'
Requests the initialization of an FTP client API environment. The string literal is not case sensitive.
initString
Start parameters that are valid to enter on a z/OS® FTP client command. The string literal is case sensitive.
envVar
Zero to nine environment variables that can be passed to the FTP client API. The string literals are case sensitive. See the following for information about FTP environment variables: Also see the z/OS UNIX System Services library and z/OS Language Environment® library of publications for information concerning environment variables.
Rules:
  • Do not specify duplicate environment variables.
  • Do not pass environment variable _CEE_RUNOPTS on an INIT request. The environment variables are established too late in the spawn() process for run-time options to be honored. See z/OS Language Environment Programming Guide for information about using the CEEDOPT program or the CEEBXITA exit to specify run-time options for the FTP client process.
  • Do not pass environment variables like _BPX_JOBNAME in the _CEE_ENVFILE file because the _CEE_ENVFILE file processing is too late in the spawn() process to set the job name. Specify _BPX_JOBNAME as one of the nine environment variables in the envVar list.
  • If using the Trace Resolver facility, the trace should be activated by specifying the RESOLVER_TRACE environment variable to collect the trace information in a file or MVS™ dataset.

Results

Table 1. FTP client INIT request return codes
Value Return codes Explanation
<0   The call did not complete successfully. The subcommand was not successfully executed. The possible failure return codes are listed in the Return codes column.
  -2 (FCAI_RESULT_IE) An interface error occurred. The interface error code is stored in the stem.FCAI_IE stem variable.
  -3 (FCAI_RESULT_CEC) A client error occurred. The client error code is stored in the stem.FCAI_CEC field stem variable.
  -17 (FCAI_RESULT_UNUSABLESTEM) The stem variable is not usable.
  -19 (FCAI_RESULT_REXXERROR) An error occurred when storing, fetching, or dropping a REXX variable.
≥0   The call completed successfully. The FTP client environment was initialized.
  0 (FCAI_RESULT_OK) No additional information is available.

Examples

rc = ftpapi('fcai.', 'init', '-w 300 127.0.0.1 21', '_CEE_DMPTARG=/tmp', '_BPX_JOBNAME=MYJOB') 

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014