REXX Tips & Tricks:Additional Software for REXX

From EDM2
Jump to: navigation, search

Development & Debugging Tools

This sections contains information about additional usefuls tools for developing REXX programs.

Samples & skeletons

Skeleton - a REXX program skeleton

Version 1.0, 03.08.1995
Author Bob Rice (Empirical Heuristics)
Distrib. Shareware, $0 fee
Type REXX programs

Description from the author:

"Extremely simple to use, the REXX Skeleton provides: display or extraction of embedded help code, automatic external function registration, automatic initialization of useful "global" variables, automatic trapping of REXX execution time events and errors with dump file generation containing variables and queues, and debug assistance. Needs only the standard OS/2 REXX but has more function with REXXLIB. Great for beginning REXX programmers as well as more advanced programmers. This is Zero-cost Shareware uploaded by the author, Bob Rice."

Note: see also Template for a REXX program

Preprocessors & Formating tools

PPWIZARD - a pre-processor

Name PPWIZARD - a generic pre-processor
Version 03.059
Author Dennis Bareis
Distrib. Freeware
Type EXE
Name: ppwos2.*

Description from the author:

"This is a generic processor (for any text files) with specific support built in for rexx and html files.

When used with the "/rexx" switch it will by default remove comments and pack rexx code and then perform a syntax check.

You have access to instructions such as #define, #evaluate, #include, #if and #ifdef. You can develop macros that take both optional and manditory parameters and the macros can conditionally generate output.

The program is extendable through rexx. Commands such as #if tests can be very complex, for example it would be relatively simple to compare environment variables or contents of files etc.

The html capability of this program is the basis of a series of e-Zine! articles (3 so far). Its use for rexx development would have to be at least as important. AWE def files are being developed using PPWIZARD macros and I generate PPWIZARD itself plus the extensive PPWIZARD INF and HTML documentation using PPWIZARD macros."

MakeREXX - a pre-processor for REXX

Name MAKEREXX - pre-processor for REXX
Version 10/92
Author Tony Thigpen
Distrib. Freeware
Type REXX program

Description from the author:

"MAKEREXX is a utility that allows a REXX programmer to create a library of generic routines. Those routines are maintained in a subdirectory named 'XXX' and must have a file suffix of '.XXX'. The REXX code produced by MAKEREXX is placed in a subdirectory of '.CMD' and will have a suffix of either '.CMD' or '.ERX'. '.CMD' files are OS/2 REXX routines while the '.ERX' files are EPM editor REXX routines. Mainline REXX routines are maintained in a subdirectory named 'REX' and must have a file suffix of either '.REX' or '.EPM'. '.REX' routines will be expanded into '.CMD' routines while '.EPM' routines will be expanded into '.ERX' routines."

PrepProc - pre-processor for REXX

Name PREPPROC - pre-processor for REXX
Version v2.00
Author Hilbert Computing
Gary Murphy
Distrib. Freeware
Type REXX program
Name: PREPRC.*

PrepProc is a simple pre-processor for REXX programs written in REXX. Supported directives in this version are #define, #ifdef, #ifndef and #include.

RxPrep - REXX pre-processor

Version 1.8, 24.11.1993
Author Richard Moore
Distrib. Freeware, DAP Software
Type REXX program
Name: RxPREP.*

This is another pre-processor for REXX programs written in REXX.

RXPREP is only available for DAP members.

REXX Toolbox and pre-processor ($)

Name REXX Toolbox and Preprozessor
Version V1.1 1995
Author Jörg Burdorf
Distrib. Shareware
Price 20,- DM

Note: All docs are in German!

FASTREXX is mainly a pre-processor for REXX programs. Also included are various REXX procedures.

RCF - REXX Code Formatter/2 ($)

Name RCF - REXX Code Formatter/2
Version Release 1.2.9
Author RKE Consulting, Inc.
Distrib. Shareware
Type VisPro REXX Executable
Price $15
Name: rcf2102j.*

Description from the author:

REXX Code Formatter/2 Description

The REXX Code Formatter/2 (RCF/2) is an OS/2 REXX application written using VisPro/REXX and VisPro/Reports. It is designed to allow a REXX programmer to format a program in a particular style, insuring that the format of each element of the REXX program conforms to that style.

Features of REXX Code Formatter/2

Using this product, users may, for example:

  • Define the indentation to be used in general plus the amount for:
    • Program statements subordinate to DO and SELECT,
    • Statements that begin with THEN/ELSE, and
    • Continued statements.
  • Specify whether:
    • Lines are to be split at semicolons,
    • Redundant spaces are to be removed from program statements,
    • New lines are to start before or after THEN/ELSE keywords, and
    • END statements are to be indented to align with the corresponding DO/SELECT subordinate statements.
  • Specify the formatting for:
    • REXX keyword Instructions,
    • REXX keywords besides those that begin a REXX keyword instruction,
    • Variables names,
    • Function names, and
    • Labels.
  • Define special formatting for selected function names.
  • Check for duplicate labels and insure all labels start on a new line.
  • Have RCF/2 create a file of label names as they appear in the program
  • so that all references to them in the program (and even other programs) will reflect this same format.
  • Align full-line, left-hand, and right-hand comments.
  • Generate a listing of the formatted program.

In addition, while RCF/2 is not a syntax-checker or code debugger, it does provide some assistance in program development. It can, for example:

  • Identify DO and SELECT instructions missing a corresponding END clause,
  • Flag comments that are not started but not closed, and
  • Highlight literal strings with a missing quote.

New features in Release 1.2.0 are:

  • A cross reference facility for labels, variables, and function names.
  • Optional formatting notes if undefined function names are found.
  • The ability to add "Commented line numbers" to statements.
  • Landscape printing formats.
  • Right-hand alignment of full-line comments with extension and truncation to allow for "boxing" of comments.
  • Specification of file name and directory for generated associated label files.
  • Maintenance of multiple generated associated label file data in a single file.
  • Separate formatting specification for the standard REXX built-in functions.
  • The specification of the file to be edited as a parameter at RCF invocation.
  • The extension of the allowable indentation values to be up to 999.
  • Placement of the print specification in a separate page to facilitate changing of printer specifications.
  • Use of WARP 4 notebook format for configuration settings when using OS/2 WARP 4.


Name RexxComm - Formats comments in REXX program files
Version 2000-07-16
Author Marcus C. de Geus
Distrib. Freeware
Type REXX program
Name: rexxcomm.*

This program formats comments in REXX program files according to a user-defined option and reports any uncommented program lines.

Syntax check programs

RXCALLLST - show the CALL structure of a program

Version 2017-12-22
Author Wilfried Eike
Distrib. Freeware
Type VisPro/REXX EXE

RXCALLST is a tool to show the CALL structure of REXX programs.

RXCALLLST shows the call structure of a REXX program in a TOP-DOWN-view and a BOTTOM-UP view. It can also detect rescursive code and dead code.

(see also #Checkfunc - Function analysis of a REXX program and #Codeanalizer)

Checkfunc - Function analysis of a REXX program

Name CheckFunc
Version 1.02
Author Toby Thurston
Distrib. Freeware
Name: checkfunc102.*

Checkfunc is a handy routine to help you develop correct and portable REXX code. It contains a mini-parser for REXX that finds all the function calls in a program and lists them out for you to see. The output listing shows:

  • BIFs Used
  • Internal functions
  • Duplicate (and therefore unreachable) labels
  • Rexxutil common functions
  • Rexxutil OS/2 only functions
  • Rexxutil Windows only functions
  • Rexxutil Version 2 functions
  • External functions
  • External commands

(see also #RXCALLLST - show the CALL structure of a program and #Codeanalizer)


Name CheckFunc
Version 1.02
Author Doug Rickman
Distrib. Freeware
Name: codeanalyzerXXX.*

Description from the author:

"CodeAnalyzer is a generic engine for analyzing and formatting REXX code. This is a tool for the REXX programmer who works with large complex programs."

(see also #Checkfunc - Function analysis of a REXX program and #RXCALLLST - show the CALL structure of a program)


RXD - Rexx Debugger

Name RXD
Version V1.4
Author Patrick J. Mueller (IBM)
Distrib. Freeware, IBM EWS
Type REXX Debugger (PM)
Name: RXD.*

RxD is a very useful debugger for OS/2 REXX programs. RxD supports Breakpoints, single stepping and watch variables. RxD is a PM program.

Note that RXD is an older 16-bit app and, according to the author, there may be some errors or unexpected conditions using it on 32-bit OS/2 (like WARP).

"Compiler" & Translator


Name REXX/Wrapper
Version 1.4
Author Mark Hessling
Distrib. GPL (GNU)
Type REXX cmd & more
Name: rxwrap14.*

Description from the author:

"Rexx/Wrapper is a tool that wraps a Rexx source file, or tokenised code into an executable program. The Rexx source code can be optionally compressed and encoded to ensure that the original Rexx code cannot be viewed (unless you have the original encryption key).

To use Rexx/Wrapper you need two extra bits of software:

  1. A supported Rexx interpreter
  2. A supported C compiler

The Rexx interpreter that is linked with the executable must be capable of executing an "instore" Rexx macro via the SAA API. The Rexx interpreter used to build the executable wrapper can be different from the interpreter used to run the executable program. If wrapping tokenised code, then the Rexx interpreter that creates the tokenised code, MUST be the same interpreter that runs the tokenised code.

All suppliers of Rexx interpreters provide access to their interpreter via a shared or dynamic library. This means that it is not possible to build a completely stand-alone executable; you will always have to include the shared or dynamic library with the executable built with Rexx/Wrapper.

There is one exception to this rule; Regina. Regina also provides a static library, which means you can link your program with Regina's static library, and you will get a completely stand-alone executable.

There is a catch however with using the Regina static library :-(. The Rexx program that you wrap, cannot dynamically load an external function package. This is because the Regina static library does not (and cannot) support the dynamic loading of external functions. External functions, by their very nature, require the presence of a dynamic or shared library to operate.

Rexx/Wrapper supports all C compilers that support ANSI prototypes. Rexx/Wrapper will not work with older K&R C Compilers.

For a list of the supported C compilers for the current platform, run rexxwrap.cmd with the '-help' switch and see the list below."

see also #RxCLS - a REXX 'compiler', #REXXCC - a REXX "compiler" and #REXX2EXE a REXX "compiler"

REXXCC - a REXX "compiler"

Name REXXCC - a REXX "compiler"
Version v3.22
Author Bernd Schemmer
Distrib. Freeware
Type "compiled" REXX program
Name: RCnnn.*

REXXCC "compiles" an OS/2 REXX program by substituting the source code with any text. This is possible because the OS/2 REXX interpreter stores a tokenized copy of each executed REXX program in the EAs of the program. If you execute an OS/2 REXX program, the OS/2 REXX interpreter first checks, if the tokenized copy in the EAs is still valid and, if so, executes the tokenized copy and ignores the source code.

Beginning with version 3.00 REXXCC can also compress REXX programs (this means: delete all leading and trailing whitespaces, all linefeeds and all comments).

Beginning with version 3.10 REXXCC also contains a REXX program to unpack packed or compressed REXX files.

Beginning with version 3.20 REXXCC also contains a REXX program to use the macro space for creating token images of REXX programs.

REXXCC is a command line program. But there is also a PM front-end for REXXCC called REXXCC/2 in the archive. REXXCC/2 uses Rexx Dialog for the PM interface.

The current version of REXXCC is always available at Hobbes in the same library as RXT&T (see Distribution)

Note: The format of the token image for REXX programs is the same since OS/2 version 2.1. So you can use a REXX program "compiled" with REXXCC on any OS/2 version since 2.1. But: You can't use a "compiled" REXX program with the new Object-Oriented REXX (see also "Compiling" REXX programs).

see also #Rexx/Wrapper, #RxCLS - a REXX 'compiler' and #REXX2EXE a REXX "compiler"

RxCLS - a REXX 'compiler' ($)

Name RXCLS - a REXX 'compiler'
Version 1.0, 1/1996
Author Steven Higgins
Distrib. Shareware
Type EXE
Price registered version: $10
Name: RXCLS.*

Description from the author:

"RXCLS is a shareware program which compiles a REXX programs into a stand alone executable. RXCLS is a 32bit program designed to run on OS/2* version 2.x or greater."

Well, the author did not say all: RXCLS does NOT compile REXX programs into machine readable code like other compilers. The only thing it does is: Create the token image of the REXX program and bind it with a little stub together to an EXE file. If called, the stub of the EXE calls the REXX interpreter to execute the included token image.

To verify this you may set the environment variable TRACE to ON and call an EXE 'compiled' by RXCLS.

But nevertheless RXCLS is fine done and useful if you want to hide your REXX source code. And this method does not have any compatibility problems through converting the REXX code, of course.

The advantage of the method used by RXCLS compared to my free REXX "compiler" REXXCC: It avoids the 64 K limit and you don't have problems with the EAs.

see also #Rexx/Wrapper, #REXXCC - a REXX "compiler" and #REXX2EXE a REXX "compiler"

REXX2EXE - a REXX "compiler"

Name REXX2EXE - a REXX "compiler"
Version 98.349
Author Dennis Bareis
Distrib. Freeware
Type EXE
Name: REXX2EXE.*

Description from the author:

"This program will "compile" a rexx program in 2 main ways. It will tokenise the rexx (no 64K limit) or will simply wrap up the source (the default). The default action is to encrypt and compress the resultant image and attach it to an EXE stub. There are all sorts of options to control the stub, for example you can have a runtime DLL or standalone EXE. You can choose to have a compact EXE which will run in Warp onwards or a larger one which will also run in 2.0+. You can generate the stub as a PM program eliminating all the hassle of using 'RxMsgBox'."

see also #Rexx/Wrapper, #RxCLS - a REXX 'compiler' and #REXXCC - a REXX "compiler"


Name ARC (Alexander's REXX Cruncher)
Version 2.00
Author Alexander Mai
Distrib. Freeware
Type REXX cmd
Name: arc.*

This is a REXX program to "crunch" (remove all not necessary parts) REXX programs


Name Rexx2Nrx - REXX to NetREXX converter
Version 2.23
Author Thomas Schneider
Distrib. Freeware
Type Java program
Name: rexx2nrx.*

This program converts Classic REXX programs to NetRexx.

EXE & DLL tools


Name ExeHdr
Version -
Author misc.
Distrib. -
Type EXE program
Name: EXEHDR.*

An ExeHdr tool is also included in the OS/2 Developers Toolkit and in nearly all C/C++ Compiler packages.

An ExeHdr tool shows the names of the functions exported by a DLL. This is useful to get the propper spellings for functions exported by a REXX DLL if the DLL was linked in a case-sensitive manner (see DLL loading failed).


Description from the author:

"PMDLL is an OS/2 presentation manager program that shows you the complete tree of DLLs loaded by an OS/2 executable file or by a DLL (both 16 and 32 bit formats are supported). Sometimes it's uncertain why a program won't start (correctly) or behaves strange when running. When this program is using DLLs one of the causes can be that DLLs can't be found or that DLLs are loaded from unexpected directories which contain an incorrect version of the DLL. PMDLL gives you an easy way to detect these kind of problems."

PMDLL is a very useful tool to detect the further DLLs needed by a REXX dll (see DLL loading failed).

There is also a command line tool named ckkdll32.exe from IBM for this purpose.

LX lite - a compressor for OS/2 executables

Name LX lite - a compressor for OS/2 executables
Version 1.3.2
Author Andrew Zabolotny
Distrib. Freeware
Type EXE program
Name: LXLT132.*

This is a fantastic program to pack OS/2 executables in Linear Executable (LX) format. OS/2 uses the LX format for .EXE, .DLL, .PDR, .QPR, .DRV, .FON and .SYS files. Virtual Device Drivers (VDDs) for DOS sessions are also in LX format. You can even compress the OS/2 kernel (os2krnl)! LX compresses the files in the same way as LINK386 does. The decompression algorithm is part of the OS/2 WARP program loader. So files compressed with LX are "simple" OS/2 executables. There's no additional stub program necessary to uncompress the compressed files.

The only drawback of this tool:

You cannot execute compressed executables under OS/2 prior to WARP because the decompression code was first introduced in WARP. But that's no great problem because LxLite can also decompress compressed files again.


LxLite is one of the most useful tools for OS/2 I've seen so far.

(see Using REXX if booted from diskette for one use of LxLite)

Another useful tool contained in this package is UNLOCK.EXE:

"unLock is a simple utility which allows to 'unlock' application executables which are currently in use. Normally when an executable is loaded by OS/2 its file is open with a deny-write sharing mode. This is done because LX format structure is designed not to swap out unused pages in executables each time when they aren't needed anymore, but rather to discard them. When a discarded page is needed OS/2 simply reads it again from the executable. However, there is still a way to replace executables 'on-the-fly' even if they are currently running. There is an so-called 'well-known-undocumented' function (which in fact means that it won't be necessarily supported in future versions of OS/2) which allow to disable sharing protection on such files. Before doing that OS/2 reads entire executable in swap file, then page swapping is done as with usual memory. If you'll 'unlock' many running executables at the same time you can notice an increase in swap file size. So, this is just an temporary workaround, you have better to reboot after doing all necessary things on former locked files. The command-line format of unLock is much like lxLite's, except that it have much less options :-)"

lsof - list open files

Name lsof - list open files
Version 07/2000
Author Shaun Tancheff
Distrib. Freeware (?)
Type EXE program (w/ source)
Name: lsof.*

You can use lsof to find out if your REXX program opens files without closing them.

You can also use the program psfiles.exe to get a list of open files (available in Warp 4 Fixpak 13) - but it's not as comfortable as lsof.


Name XWorkplace
Version 1.0.0
Author Ulrich Moeller
Distrib. GPL (freeware)
Type WPS Extension (DLL)
Name: xwp.n.m.r.* - where n is the major version; n is the minor version and r is the revision

XWorkplace (or its predecessor XFolder) is not only the best WPS enhancer for OS/2 - it's also a very good tool to examine the internals of the WPS.

XWorplace is a must have for OS/2 users and developers.

XRay - a PM window peeker

Name XRay - a window peeker
Version 1.0
Author CodeSmith Software
Distrib. Freeware
Type EXE program (w/ source)
Name: XRAY.*

Xray is an utility to display window info of window under the mouse pointer.

You can use this tool to get the IDs necessary for the new setup string MENUITEMSELECTED in WARP 4.


Name psPM - Process Status Presentation Manager
Version v5.20
Author Seth A. Eilbott
Distrib. Freeware
Type PM program
Name: PSPM.*

Description from the author:

"PSPM graphically displays the status of all processes running in OS/2. PSPM allows you to display information about any process, including thread information, to terminate a process or an entire process tree, or to switch to a running process."

PSPM (or a similar tool) is necessary if a program using VREXX crashes without calling VEXIT. In this case you must delete the invisible process created by VREXX manually before you can use VREXX in other REXX programs.

Misc. develop tools


Name Configtool
Author Program: Goran Ivankovic
Database: Klaus Staedtler
Distrib. Freeware
Type Database/INF file
Name: cfgtool.*

ConfigTool is AFAIK the best database with various information about the CONFIG.SYS of OS/2. It includes also a tool to check and optimize the CONFIG.SYS.