Attachmate Worldwide  |   Contact Us  |   NetIQ.com
Home » Support » Solution Library

Technical Notes

Host Programs that Initiate File Transfers with Reflection
Technical Note 1280
Last Reviewed 02-Jun-2005
Applies To
Reflection for HP version 10.0 or higher
Reflection for ReGIS Graphics version 10.0 or higher
Reflection for UNIX and OpenVMS version 10.0 or higher
Summary

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.

Transferring Files with a Host Program

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.

Completion Codes and File Transfers

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:

  1. The host program sends a Reflection Basic (RB) or Reflection Command Language (RCL) command to Reflection requesting a file transfer. Note: You cannot send commands to Reflection from a host program using Visual Basic for Applications (VBA).

See Technical Note 2148 for information about executing Reflection Basic (RB) host-initiated commands using Microsoft Visual Basic for Applications (VBA).

  1. If the file exists, Reflection returns the host startup sequence to start the file transfer program on the host, and then proceeds to the next step. If the file does not exist, Reflection returns a completion code indicating the operation failed, and the host program aborts the transfer.
  2. Once the host transfer program successfully starts, the file is transferred.
  3. When the transfer is complete, Reflection returns a completion code indicating success. If the transfer was interrupted or could not be completed, Reflection returns a completion code indicating that the file transfer failed.

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.

Sample Files

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.

Troubleshooting Tips

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:

  • The file transfer program on the host cannot be started or does not exist.
  • The file to be transferred does not exist in the specified location. Verify the location of the file on the PC or the host.

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.

Contacting Attachmate

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:

  • An event trace showing the interaction between Reflection and the host program. For instructions on generating an event trace, see Technical Note 1374.
  • A file transfer log file created when attempting to manually transfer the file with Reflection. The steps for creating a file transfer log file vary depending on your host type and are covered in your Reflection documentation.
  • The version number of the file transfer program on the host. See Technical Note 1030 for instructions on obtaining the version number.
Related Technical Notes
1030 Identifying and Updating Your Version of the WRQ/Reflection Host File Transfer Protocol
1223 How to Send Reflection Commands from the Host
1278 Sending RCL Commands to Reflection from a Host Program
1279 Sending RB Commands from a Host Program
1374 How to Perform an Event Trace in Reflection
2148 Executing Host-Initiated Reflection Basic Commands Through VBA

Did this technical note answer your question?

Yes    No    Somewhat     Not sure yet

Additional comments about this tech note:

Need further help? For technical support, please contact Support.