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

Technical Notes

Sending RCL Commands to Reflection from a Host Program
Technical Note 1278
Last Reviewed 17-Aug-2007
Applies To
Reflection for HP version 12.0 or higher
Reflection for UNIX and OpenVMS version 12.0 or higher
Reflection for ReGIS Graphics version 12.0 or higher
Summary

Reflection can execute Reflection Command Language (RCL) commands sent from a host program. This technical note describes the syntax used in the host program and explains how to effectively use completion codes returned by Reflection.

For an overview of how host-initiated programs work with Reflection, refer to Technical Note 1223.

Sending Commands to Reflection

RCL is best used for host programs that send a single command to Reflection or that perform simple functions. To write host programs that perform complex procedures or use OLE (object linking and embedding) technology, use Reflection Basic (RB) instead. See Technical Note 1279 for details.

RCL commands in a host program appear on a single line within an escape sequence (HP emulation) or device control string (VT emulation).

HP Emulation

Syntax: <ESC>&o<term><RCL command><CR>

Example: <ESC>&oB SET CAPS-LOCK YES <CR>

VT Emulation

Syntax: <DCS>1234;<term> {<RCL command><ST>

Example: <DCS>1234;b {SET CAPS-LOCK YES <ST>

<ESC>, <DCS>, <ST>, and <CR> are described in Generating Special Characters below.

<term> specifies whether or not Reflection returns a completion code to the host program. See Specifying Completion Codes below for acceptable values.

Generating Special Characters

Use the values and key combinations below to properly generate the following special characters in your host programming language.

ASCII and 7-bit Values

Special characters
Decimal
Hexadecimal
Octal
7-bit
<CR>
13
0D
15
-
<ESC>
27
1B
33
-
<DCS>
144
90
220
<ESC>+P
<ST>
156
9C
234
<ESC>+\

Specifying Completion Codes

Although many choices are available, we recommend that you use one of the following values for <term>. Other options are listed in your Reflection documentation.

HP Emulation

B
Always return a completion code
F
Never return a completion code

VT Emulation

1
Always return a completion code
2
Never return a completion code

How Completion Codes are Returned

When Reflection receives a command that requires a completion code, it returns one of the following values:

S
Indicates the command was successfully executed
F
Indicates the command failed

The host program should process either reply gracefully. For an explanation of special completion codes associated with file transfers, see Technical Note 1280.

Related Technical Notes
1223 How to Send Reflection Commands from the Host
1279 Sending RB Commands from a Host Program
1280 Host Programs that Initiate File Transfers with Reflection

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.