14. REXX Support
14.1 Prerequisites
Support for Rexx (both ooRexx and Regina Rexx) is built into the downloadable version of Hercules. The
only thing needed is to install one (or both) of the two supported Rexx packages (see
If the Rexx packages are installed with the standard installation procedures (using the provided installers)
then the needed environment variables are created automatically during the installation and no manual
action is required. For more information on how to build Rexx support into Hercules please refer to the
“Installation Guide”.
14.2 Using Rexx
Rexx can be used in various ways within Hercules:
14.2.1 Explicitely invoking Rexx
The EXEC console command may be used to explicitely invoke a Rexx script. The required argument is
the name (and optionally path) of the Rexx script. Optional arguments will be passed to the Rexx script.
Example 1:
EXEC d:\rexx\script.rex arg1 arg2
In the above example the Rexx script named “script.rex” located on drive d: in directory “rexx” will be
called with “arg1” and “arg2” as arguments.
14.2.2 Implicitely invoking Rexx
Rexx will be invoked implicitely if existing script files (e.g. a configuration file or a run-commands file) start
with “/*”.
Example:
/* REXX */
SELECT
WHEN SYSTEM = 'S/370' THEN DO
ADDRESS HERCULES 'ARCHLVL S/370'
ADDRESS HERCULES 'ENGINES 1*CP'
ADDRESS HERCULES 'MAINSIZE 16'
ADDRESS HERCULES 'XPNDSIZE 0'
END