Introduction
BLAST Data Pump includes Xmodem protocol for transferring files with systems that do not offer the BLAST protocol.
There are several limitations to the Xmodem protocol. Awareness of these can prevent problems in using Xmodem. Xmodem protocol:
@DS_BITS is set to "8/1" and @PARITY is set to "NONE." If you use Telnet, make sure that you use an 8-bit connection.
@XMPADCHAR reserved variable in a script.
@PROTOCOL reserved variable to "Xmodem" or "Xmodem1K" in a script.
Establishing Xmodem Transfers
Prior to writing your script to do Xmodem transfers, you need to know how to issue Xmodem commands on the remote system. If you do not know how, consult the system administrator for instructions on issuing Xmodem commands on the remote system.FILETRANSFER command and then either a
GET or a
SEND followed by an ESC statement.
Sending and Receiving Files with Xmodem
Below is a script that illustrates sending and receiving files with Xmodem. The script is receiving the file called "sales" from a UNIX-based machine running Xmodem. The file will be called "Sales_Data" on the local machine. The "o" at the end of the line specifies that the file should be overwritten if it exists on the local machine. The script is sending a file called "Inventory_Control" to the remote machine, where it will be called "inventory."
CONNECT |
Please note, there is no provision within the Xmodem protocol for specifying the remote filename. Data Pump, however, uses the same three-parameter syntax for
GET and SEND statements with all supported protocols. This common syntax allows you to change the protocol used for a transfer without having to change the script. Thus, the null strings ("") in the script above represent the remote filename. If a remote filename is specified, Xmodem ignores it.
| 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 local 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 local system. There is no provision within the Xmodem protocol for protecting against overwriting a file on a remote system during a SEND.
filetransfer |
| Append |
Append is specified by putting an "a" on 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 local system. If the file does not exist on the local system, it will be created. There is no provision within the Xmodem protocol for specifying append to a file on a remote system during a SEND.
filetransfer |
| No Overwrite |
No overwrite is specified by putting an "n" on the end of a
GET command. No Overwrite causes the transmitted file not to overwrite an existing file of the same name on the local system. Because No Overwrite is the default, this option is not actually needed. However, to be explicit, you may add it to a script. There is no provision within Xmodem for protecting against overwriting a file on a remote system during a SEND.
filetransfer |
For a table listing transfer options for all supported protocols, see File Transfer Options under Transferring Files.
Ending Xmodem Transfers
Xmodem transfers end when an ESC statement is issued after a SEND or a GET.