The jobvar command can be used to inform the FTP client as to whether the command return information is to be stored in a job variable.
An alternative to the storage of error information is offered by the svar command (see "svar - Store error information in an SDF-P variable").
If an error occurs when processing the jobvar command and if task switch 1 is set (batch operation), the FTP client is terminated with TERMJ. The batch job or the procedure is therefore only continued after the next STEP instruction.
If the provision of a job variable is activated, the behavior of commands that execute several individual actions (commands mdir, mls, mget, mput, mdelete) changes. In the case of these commands, command processing is aborted after the first faulty action.
In contrast, the FTP client is not terminated with TERMJ in batch mode if the admission data in the open command is faulty.
The JV subsystem must be activated in order to use the jobvar command.
jobvar |
< jv-name> | *NONE | *OFF | *ON |
<jv-name>
Name of job variable that is to supply the FTP client with the command return information after the jobvar command is issued. If the job variable <jv-name> does not already exist, it is created.
*NONE
Specification of *NONE causes a job variable to be no longer supplied with command return information from the FTP client.
*OFF
Specification of *OFF causes a (temporary) deactivation of the job variable supply with command return information from the FTP client. Together with its pendant *ON the supply of the job variable can be constrained to commands whose return information is relevant. This can be used e.g. for a simple batch operation, where a procedure checks not every issued FTP command, but where after e.g. a single put command the job variable supply is deactivated, so a trailing quit command doesn't overwrite the job variable.
*ON
Specification of *ON activates the job variable supply again.
Layout of job variables
Offset / Length | Field | Field description |
0 / 3 | Status indicator | '$S ': Command executed successfully |
3 / 1 | Filler | Always "0" |
4 / 4 | TSN | TSN of FTP client task |
8 / 4 | catid | Supplied with spaces |
12 / 4 | Session number | System sequence number |
16 / 16 | User command name | Name of FTP client command |
32 / 96 | Command Parameter | FTP command parameter |
128 / 4 | FTP protocol command | Command sent from the client to the server |
132 /124 | FTP message | Local message or server response |