Technical Notes |
|
Reflection can execute Reflection Basic (RB) or Reflection Command Language (RCL) commands sent from a host program. This technical note includes general information, special considerations, and troubleshooting tips for writing host programs that send commands to Reflection.
Host programs are written in a programming language native to the host, such as DCL, C, or COBOL. Embedded within the host program are Reflection commands written in either RB or RCL. When Reflection receives a command from the host, it will execute that command as though the user had executed it from the command line, the RB script editor, or RCL command window.
Creating a host program requires knowledge of both the host programming language and Reflection scripting languages. For information on RB or the RCL, refer to your Reflection documentation. For information on which programming languages are supported by your host, consult your host documentation.
Note: You cannot send commands to Reflection from a host program using Visual Basic for Applications (VBA); however, you can use the RunMacro or RunExternalMacro methods in a Reflection Basic Script to invoke a VBA macro.
You can send commands to Reflection using either RCL or RB. RCL is recommended for simple commands that do not require OLE (object linking and embedding) technology. For more complex procedures or to use OLE, use RB instead.
Commands sent from a host program to Reflection generally go through the same set of steps:
Regardless of which Reflection scripting language you use, Reflection commands must be contained in a specific escape sequence that tells the host to pass the command to Reflection, rather than executing it on the host. The specific syntax for RB commands is described in Technical Note 1279. The syntax used to send RCL commands is described in Technical Note 1278.
How completion codes are specified depends on whether the host program sends commands to Reflection using RB or RCL. For this reason, completion codes are described in Technical Note 1279 for RB commands, and Technical Note 1278 for RCL commands.
When writing a host program to send commands to Reflection, bear in mind the following special considerations.
When sending commands to Reflection in HP emulation, use HP Character Mode, rather than HP Block Mode.
Many host programs involve a file transfer to or from Reflection at some point. Special considerations that apply to host-initiated file transfers are covered in Technical Note 1280.
Technical Note 1536 explains how to obtain sample scripts, settings files, and macros for Reflection 9.0 or higher. These samples describe in this note demonstrate Reflection product functionality.
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.
The table below lists two additional examples written by Attachmate technical support engineers. These files are available from download.attachmate.com.
| Sample File |
Description |
| RBLaunchIE.udc.txt |
This HP 3000 UDC script demonstrates using Reflection Basic to control Internet Explorer. |
| XferUNIX.txt |
This korn shell script demonstrates using RCL to download a file to the pc. |
If you experience problems running your host program, try the following:
If you cannot resolve your problem using this technical note, contact Attachmate technical support for assistance. For instructions on contacting Attachmate technical support, see http://support.attachmate.com/contact/.