Technical Notes |
|
This technical note explains the principles of writing a host program to initiate file transfers between a host computer and Reflection.
This note supplements Technical Note 1223, which gives a general overview of host programs that send commands to Reflection.
Many host programs involve a transfer of files between Reflection and the host. To transfer files, Reflection and the host must use the same file transfer protocol.
Reflection comes with several host file transfer programs that enable files to be transferred to and from the host computer. This protocol includes features such as wildcard transfer in both directions, Huffman data compression, sliding windows, and network-speed file transfer.
The file transfer program for your host is usually uploaded by the system administrator when Reflection is installed.
When Reflection receives a command to transfer a file, it first checks to make sure the file exists. If the file exists, Reflection returns a host startup sequence instructing the host to start the appropriate file transfer program. With the file transfer program running, the host can transfer files to or from Reflection.
Building a successful host program requires careful utilization of completion codes to make sure all meaningful errors are communicated back to the host.
A host-initiated file transfer should involve the following steps:
See Technical Note 2148 for information about executing Reflection Basic (RB) host-initiated commands using Microsoft Visual Basic for Applications (VBA).
As you can see, there are two places where the host program waits for a reply from Reflection: first, to verify that the requested file exists, and second, to verify that the file was successfully transferred. Your host program must be written to handle Reflection’s reply at either of these points.
For details on specifying completion codes in RB, refer to Technical Note 1279; in RCL, refer to Technical Note 1278.
For information about how to obtain sample scripts, settings files, and macros for Reflection that describe and demonstrate Reflection product functionality, see Technical Note 1536.
You can use these sample files as a starting point in creating your own host programs, however, modifying the files requires knowledge of both the host programming language and Reflection's scripting languages. Consult your host documentation for information about writing programs for your host computer. For information about Reflection's scripting languages, refer to your Reflection documentation.
If your host program cannot successfully transfer a file, try manually transferring the file with Reflection. If you cannot manually transfer the file, check the following:
Consult your Reflection documentation for additional techniques to use when troubleshooting file transfers, including instructions for generating a file transfer log file for your host type.
For general troubleshooting tips related to host programs, see Technical Note 1223.
If you are able to transfer the file manually, but the host program still does not work, contact Attachmate technical support for further assistance. For further contact information, see http://support.attachmate.com/contact/.
When you call, please have the following items on hand: