Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

svar - Store error information in an SDF-P variable

&pagelevel(4)&pagelevel

You can use the svar command to inform the FTP client whether it is to store command return information in an SDF-P variable.

The jobvar command (see "jobvar - Store error information in a job variable") offers an alternative to storing error information.

If an error occurs when editing the svar command and if task switch 1 is set (batch mode), the FTP client is terminated with TERMJ. The batch job or procedure is then only continued after the next STEP instruction.

If the provision of an S 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.

svar

<sv-name> | *NONE | *OFF | *ON


<sv-name>

Name of the SDF-P variable (S variable) which the FTP client is to supply with the command return information after the svar command is issued. This S variable is created again for this purpose. If an S variable with the name <sv-name> already exists, it is deleted first.

*NONE

The provision of the S variable is halted by entering *NONE.

*OFF

The provision of the S variable is (temporarily) deactivated by entering *OFF. Together with its pendant *ON the supply of the S 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 S variable supply is deactivated, so a trailing quit command doesn't overwrite the S variable.

*ON

The provision of the S variable is activated again by entering *ON.


Layout of S variables

Element

Element description

<sv-name>.STATUS

'$S ': Command executed successfully
'$E ': Command has errors
'$T ': FTP client ended normally
'$A ': FTP client ended abnormally with errors

<sv-name>.USERCMD

Name of FTP client command

<sv-name>.CMDPARAM

FTP command parameter

<sv-name>.PROTCMD

Command sent from the FTP client to the FTP server

<sv-name>.MESSAGE

Local message or server response