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

Transferring Files

File Transfer Status Dialog

The File Transfer Status dialog provides a graphical display of the current state of transfers. The File Transfer Status dialog is a feature of Blast.exe and is designed to assist in debugging file transfer applications. There is no File Transfer Status dialog in Blastdp.exe.

FILE TRANSFER STATUS DIALOG


The first row of the dialog indicates the size of the files being sent and received.

The fields in the second row are graphical representations of the percentage completion of files being transferred. No percentage completion is shown for Xmodem receives because the Xmodem protocol has no facility for transmitting the file size to the receiving system.

The fields in the third row specify the path and name of files being transferred.

The fourth row indicates the number of bytes being transferred and the number of errors that have occurred during the transmission.

The main section of the dialog contains the message area where status messages concerning the current session are displayed. Additionally, any information that is displayed to the Script Viewer during a file transfer session will be displayed in the message area.

The bottom row contains the following:


Close Automatically YES  [NO]

Specifies that the File Transfer Status dialog close automatically when all file transfers are complete. If Close Automatically is not enabled, the dialog will stay open until the Close Button is clicked.


Close Button

Closes the File Transfer Status Dialog.


Abort Button

Immediately aborts all file transfers.


Transferring Files

Data Pump is designed to be a file transfer automation tool. The user interface of Blast.exe is provided to facilitate debugging of a file transfer process. As such, there is no menu item to start a file transfer. All file transfers must be initiated from a script.

Below is a brief discussion of the elements of a script to transfer files. More information on the specifics of each file transfer protocol is available under The BLAST Session Protocol, Xmodem, and FTP.

File Transfer Basics

Scripting a file transfer is largely the same for all file transfer protocols supported by Data Pump. The elements of a file transfer block in a script are: FILETRANSFER statements, SEND and/or GET statements, and an ESC statement.

FILETRANSFER and ESC statements should be looked upon as bracketing a series of file transfer commands to create a file transfer block within a script. It is possible to execute a variety of BLASTscript statements within a file transfer block. However, you will not be able to execute any operations that send data to the port like TSEND and TUPLOAD; nor will you be able to execute any command that captures data from the port like TTRAP, TCAPTURE, or SETTRAP.

For compatibility with older versions of BLAST, it is possible to specify local and remote files names and transfer options on multiple lines. However, use of multi-line GET and SEND statements is deprecated.

Getting Files

The general form of a GET statement is:
    FILETRANSFER
GET "remote_filename", "local_filename", "file_transfer_option(s)"
ESC

For example, to get a file called "Daily_sales" from the remote system and call it "Milwaukee_sales" on the local system, you would issue the following command:

    FILETRANSFER
GET "daily_sales", "milwaukee_sales"
ESC

Suppose you wish to save the file "Milwaukee_sales" in the "C:\Milwaukee\" directory, you would issue the following command:

    FILETRANSFER
GET "daily_sales", "C:\\milwaukee\\milwaukee_sales"
ESC

Please note the use of the double backslashes (\\), which must be used within any quoted statement.

Although the Xmodem protocol has no provision for specifying the remote file, Data Pump uses the same three-parameter syntax for all supported protocols. This common syntax allows you to change the file transfer protocol without having to change the script. The remote filename is ignored during transmission.

FTP, BLAST protocol, and Xmodem support a variety of transfer options. For example, to get the file described above and do a text translation between the remote and local system, you would add a "t" as a third parameter and issue the following command:

    FILETRANSFER
GET "daily_sales", "milwaukee_sales", "t"
ESC

Different file transfer protocols support different file transfer options. For a summary of specific file transfer options, see File Transfer Options below.

The BLAST protocol and FTP support a variety of file transfer templates, which are useful for scripting shortcuts and doing multiple transfers using wildcards.

Sending Files

Using the BLAST protocol and FTP, the general form of a SEND statement is:

    FILETRANSFER
SEND "local_filename", "remote_filename", "file_transfer_option(s)"
ESC

For example, to send a file called "Inventory" and call it "Moncure_inventory" on the remote system, you would issue the following command:

    FILETRANSFER
SEND "inventory", "moncure_inventory"
ESC

As with GETs, it is possible to specify a variety of file transfer options when sending files using the BLAST protocol and FTP. For example, to send the file described above and overwrite the file on the remote system, you would add "o" as a the third parameter and issue the following command:

    FILETRANSFER
SEND "inventory", "moncure", "o"
ESC

The BLAST protocol and FTP also support file transfer templates (discussed below) when sending files.


Executing Remote Commands

Data Pump supports execution of remote commands during BLAST protocol sessions and FTP sessions. The Xmodem file transfer protocol has no provisions for executing remote commands. The following table summarizes remote commands supported by Data Pump during FTP and BLAST protocol sessions.

BLAST

FTP

RCHDIR

X

X

RDELETE

X

X

RLIST

X

X

RPRINT

X

 

RRENAME

X

X

RTYPE

X

 

For example, to change directory on the remote machine to "/usr/local/etc," issue the following command:

    FILETRANSFER
RCHDIR "/usr/local/etc"
ESC


File Transfer Options

Data Pump supports a variety of file transfer options in the BLAST protocol and FTP. The following table summarizes the supported transfer options:

Transfer Option
BLAST

FTP

Xmodem

GET

SEND

GET

SEND

GET

SEND

T (Text)

X

X

X

X

 

 

O (Overwrite)

X

X

X

 

X

 

A (Append)

X

X

X

 

X

 

S (Store)

X

X

 

 

 

 

F (Forward)

X

X

 

 

 

 

CN (Compression, level)

X

X

 

 

 

 

N (No Overwrite)

X

X

X

 

X

 

B (Binary)

X

X

X

X

 

For a description of these transfer options, see Specifying Transfer Options under The BLAST Session Protocol.


File Transfer Templates

File transfer templates allow scripting shortcuts and transfer of multiple files with similar names using the wildcard characters "?," "*," and "%" as part of the filename. The table below summarizes the usage of file transfer templates with the BLAST protocol and FTP. Because there is no provision within the Xmodem protocol for specifying the remote filename or for doing wildcard transfers, Xmodem protocol does not support file transfer templates. Note that all of the source files must be located in the same directory.

?

Substitutes for a single character.

*

Substitutes for multiple characters.

%

Substitutes for the name of the file without the path specification.

The following example uses "%" as a scripting shortcut. To get a file called "C:\Daily_sales\reports\report" from the remote machine and store it as "report" in the current directory of the local machine, you would issue the following command:

    FILETRANSFER
GET "C:\\Daily_sales\\reports\\report", "%"
ESC

To send "C:\daily\inventory\report" to the remote machine and store it as "report" in the remote current directory, you would issue the following command:

    FILETRANSFER
SEND "C:\\daily\\inventory\\report", "%"
ESC

To get all files in the directory "C:\Daily_sales\reports\" and store them in the local current directory, you would use "*" and "%" in the following command:

    FILETRANSFER
GET "C:\\Daily-Sales\\reports\\*.*", "%"
ESC

IMPORTANT:  "%" is REQUIRED as the target filename when the source filename contains a "?" or an "*". Some remote computers will recognize switches sent with the remote filename as file-handling and file-attribute controls. Experiment with the transfer switches until you obtain the correct results. Some examples are:

Source Name

Target Name

Comment

C:\\test1.asc

C:\\test1.asc

one file, sent to the directory C:\

C:\\test1.asc

%

one file, sent to the current directory

C:\\test?.asc

C:\\%

multiple files - for example, Test1.asc, Test2.asc, and Test3.asc

C:\\test1.*

C:\\%

multiple files - for example, Test1.asc, Test1.lst, and Test1.txt

C:\\*.*

C:\\BIN\\%

multiple files - all files in the source directory C:\, sent to the remote directory C:\BIN\


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
Copyright © 2000, BLAST, Inc. All rights reserved.