Table of Contents | Intro | Quickstart | Phonebook | DP Viewer | Cmd. Line Ref. | Transferring Files
BLAST Protocol | Xmodem | FTP | BLASTscript Topics | Connecting/Disconnecting
Command Ref. | Reserved Variables | Autopoll | Error Messages | ASCII Char. Set

FTP

Introduction

BLAST Data Pump includes FTP for transferring files with systems via TCP networks.

FTP is selected by choosing "FTP" on the Protocols Properties Page in a phonebook listing or by setting the @PROTOCOL reserved variable to "FTP" in a script.

Data Pump will attempt to log you into the remote FTP server using the Login Account and Password specified in the phonebook listing or the @USERID and @PASSWORD reserved variables specified in the script.


Establishing an FTP Session

An FTP session is started on the local machine running Data Pump by issuing a FILETRANSFER command in your script.


Sending and Receiving Files with FTP

Below is a script that illustrates sending and receiving files using FTP. The script is getting a file called "Sales_data" in the subdirectory Daily\ on the remote FTP server. The file will be saved as "C:\Tmp\Sales_data." The "to" option at the end of the line directs Data Pump to transfer the file as text and to overwrite the file on the remote system if it exists.

The script is sending a file called "Price_changes" in the C:\Tmp\ directory to the subdirectory New_prices\ on a remote FTP server. There are no file transfer options specified on the line, so no special processing of the file will occur during the send.

      FILETRANSFER
GET "daily/sales_data", "C:\\tmp\\sales_data", "to"
SEND "C:\\tmp\\price_changes", "new_prices/price_changes"
ESC

If you are running Blast.exe, you will see the File Transfer Status dialog, which gives the status of files being transferred.

Remote Commands

Data Pump supports the following remote FTP commands: RCHDIR, RDELETE, RLIST, and RRENAME. For compatibility with old versions of BLAST, the REMOTE command with the CHDIR, DELETE, RENAME and LIST directives are still supported. However, usage of the REMOTE command is deprecated.

Local Commands

The Data Pump supports the following local commands during an FTP session: LCHDIR, LDELETE, LLIST, LPRINT, LRENAME, LRUN, LSYSTEM, and LTYPE. For compatibility with old versions of BLAST, the LOCAL command with the CHDIR, DELETE, RENAME, PRINT, SYSTEM, and LIST directives are still supported. However, usage of the LOCAL command is deprecated.


Specifying Transfer Options

Text

Text is specified by putting a "t" at the end of a SEND or GET command. Text will specify text translation from DOS file format to the destination system's text file format. This option should only be used with ASCII files you wish to translate to the text file format of the remote system--Do not send binary files using the text option.

      filetransfer
send "C:\\daily\\daily.sal", "pittsboro/daily.sal", "t"
esc


Overwrite

Overwrite is specified by putting an "o" at the end of a GET command. Overwrite will cause the transmitted file to overwrite an existing file of the same name on the receiving system. This will result in the destruction of the existing file, so use Overwrite with caution. An error will result if this option is not used and the file already exists on the receiving system. There is no provision within FTP for protecting against overwriting a file on a remote system during a SEND.

      filetransfer
get "C:\\milwaukee\\data\\sales", "D:\\milwaukee\\data\\sales", "o"
esc


Append

Append is specified by putting an "a" at the end of a GET command. Append will append the transmitted file to the end of an existing file with the same name on the receiving system. If the file does not exist on the receiving system, it will be created. There is no provision within FTP for specifying append to a file on a remote system during a SEND.

      filetransfer
get "new_info", "news", "a"
esc


No Overwrite

No overwrite is specified by putting an "n" at the end of a GET command. No Overwrite causes the transmitted file not to overwrite an existing file of the same name on the receiving system. Because No Overwrite is the default, it is not actually needed. However, to be explicit, you may add it to a script. There is no provision within FTP for protecting against overwriting a file on a remote system during a SEND.

      filetransfer
get "C:\\Retail\\daily.dat", "D:\\Retail\\daily.sal", "n"
esc

For a table listing transfer options for all supported protocols, see File Transfer Options under Transferring Files.


Ending an FTP Session

FTP sessions end automatically when all specified files are transferred and an ESC statement is encountered in the script.


Table of Contents | Intro | Quickstart | Phonebook | DP Viewer | Cmd. Line Ref. | Transferring Files
BLAST Protocol | Xmodem | FTP | BLASTscript Topics | Connecting/Disconnecting
Command Ref. | Reserved Variables | Autopoll | Error Messages | ASCII Char. Set


support@blast.com