Rexx/Trans
Rexx/Trans
Version 1.8
15 Apr 2006

Overview

Rexx/Trans is a dynamic link library or shared library that translates Rexx API calls from an external function package or application into API calls specific to a particular Rexx interpreter.

Rexx/Trans is only of interest to people building and distributing applications that use Rexx external function packages.

Support

With Rexx/Trans on SourceForge, support resources for Rexx/Trans. such as mailing lists, discussion forums, bug reporting and feature requests are available.

Rexx/Trans is freeware, distributed under the GNU Library General Public License .

What's its purpose ?

For those of you who have developed or are developing Rexx external function packages or applications that use Rexx, you only need to build your code against one Rexx API library and distribute one set of executables per platform. Your application will work with any supported Rexx interpreter on that platform.

How do I use it ?

Simply #include <rexxtrans.h> instead of <rexxsaa.h>, or whatever your Rexx header file is, and then link your application or external function package against the Rexx/Trans library.

How does it work ?

When you link your Rexx application against an import library (or shared library) supplied with the Rexx interpreter, details about the Rexx API calls are embedded in your application or external function package. These details consist of the API function name, the name of the dynamic or shared library and the position of the API function in the library. To enable multiple Rexx interpreters to work on the one machine, all suppliers of Rexx interpreters call their Rexx interpreter's dyanamic or shared libraries by different names. It is this unique library name that gets embedded in your application. This means that when you link your application against, say Open Object Rexx, then it will only run with the shared libraries supplied with Open Object Rexx.

With Rexx/Trans, your application contains references to the Rexx/Trans library. On the first call to a Rexx API function, Rexx/Trans determines which Rexx interpreter to use (more on this later), and loads all entry points for the Rexx API functions into memory from the appropriate dynamic or shared library. When you call a Rexx API function, such as RexxRegisterFunctionExe this function in the Rexx/Trans dynamic or shared library looks up the table in memory containing the entry points for the Rexx interpreter and calls this entry point using the parameters passed.

What platforms is it available for ?

Currently available for Windows NT/95/98/Me/2000/XP, various Unix and Linux platforms, OS/2 and BeOS.

What Rexx interpreters does it work with ?

Rexx/Trans works with the following Rexx interpreters:

Win32

Unix

OS/2

  • Regina
  • Builtin Rexx interpreter; Classic or Object REXX

BeOS

What Rexx interpreters does it NOT work with ?

Rexx/Trans does not work with the following interpreters, because they are "binary incompatible". ie various internal values as defined in the SAA API header files differ to those in <rexxtrans.h>

What Rexx interpreters might it work with ?

Rexx/Trans may work with the following interpreters, but I don't have access to them to test.
  • uni-REXX
  • S/REXX

Selecting an interpreter at runtime

When an application linked with Rexx/Trans is run, at the first call to a Rexx API function, a check is made for an environment variable: REXXTRANS_INTERPRETER. If this is found and the value is a valid, supported Rexx interpreter on the platform, Rexx/Trans dynamically loads that interpeter's entry points for the API functions. On subsequent Rexx API calls, Rexx/Trans executes the API function from the correct interpreter's DLL or shared library.

If REXXTRANS_INTERPRETER is not set, Rexx/Trans tries to find a Rexx interpreter to use. If one is found the application continues.

The valid values for REXXTRANS_INTERPRETER on various platform (in default search order) are:

Win32

  • regina Regina
  • oorexx Open Object Rexx
  • objectrexx IBM Object Rexx
  • personalrexx Quercus Personal Rexx
  • winrexx Enterprise Rexx
  • unirexx Workstation Group uni-REXX (possible future support)
Unix
  • regina Regina
  • oorexx Open Object Rexx
  • objectrexx IBM Object Rexx
  • rexximc REXX/imc
  • unirexx Workstation Group uni-REXX (possible future support)
OS/2
  • regina Regina
  • objectrexx IBM Object Rexx
Rexx/Trans recognises another environment variable: REXXTRANS_TRACEFILE. This can be set to a valid filename, and all calls to the API functions together with parameters and return codes are logged to this file. This can be useful for dubugging Rexx API applications.

Rexx SAA API Documentation

Documentation on the Rexx SAA API can be found in one of:
Last Updated: 15 April 2006. Copyright © 1998-2006 Mark Hessling, <mark@rexx.org>