Example 2:

Use the dot matrix display of a 3480 tape unit to implement an automatic tape library (please note that the
first HAO command has been split over two lines to fit on the page):

HAO TGT HHC00224I 0:([0-9A-F]{4}) Tape file *, type aws:

display (?:".{8}" / )?"M([A-Z0-9]{1,6})\s*S"

HAO CMD devinit $1 D:\MVSTAPES\$2.AWSTAPE

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

Appendix H. Links ).

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:

Invoking Rexx scripts explicitely through the EXEC console command. Invoking Rexx in the run-commands file. Invoking Rexx in the configuration file.

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

Previous Page Next Page