FTP_COMMANDLIST

LANSA Composer

FTP_COMMANDLIST

This Activity connects to the FTP host specified in the FTP Configuration and then executes FTP commands from a command list file. The command list file may be specified on the FTP Configuration or overridden by the COMMANDLISTFILE parameter. The command list file is a text file.

An email Event notification named FTPCMDLSTFAILED is available in this Activity. If this event is active and a failure occurs in this Activity, then an email will be sent. Refer to Event Maintenance for setting up Event notifications.

INPUT Parameters:

FTPCONFIG : Required

This parameter should contain the name of an FTP Configuration with the type of Command List. This Configuration can be created and maintained using the FTP Configuration option in the Navigator.

If this parameter is not provided or is not found, this Activity will return an error and processing will be abandoned.

COMMANDLISTFILE : Optional

If it contains a non-blank value it will be used for the command list. If this parameter is not provided, then the command list file from the FTP Configuration will be used. Refer to the 2.3.2 FTP Configuration for a description and examples of command formats.

OUTPUT Parameters:

There are no output parameters.

Processing

This Activity uses either the LANSA Integrator FTPService or SFTPService (depending on FTP configuration choices).

It uses the Connection information from the FTP Configuration to connect to the remote host.

The command list file is read, one line at a time. The line terminator may be a carriage return, line feed, new line, carriage return line feed or line feed carriage return. Lines with a first character of # are considered to be comments and are ignored. All other lines should contain a single FTP command which can be used by the LANSA Integrator FTPService or SFTPService. These commands are executed using the LANSA Integrator service and must conform to that format.

Any failure encountered when executing the commands will attempt to invoke the email Notification event, FTPCMDLSTFAILED. If this event is active then an email will be sent to the specified email address with a notification of the failure.