Rexx Example Loading and Using Java Implemented Command Handlers
Hint: if you wish to look at the ooRexx code with syntax highlighting, then you can
use the free and open-source editor "[g]vim"
, which is available for practically
all platforms and can be downloaded from its homepage at
http://www.vim.org/.
- . <directory> (List of this directory)
- Display all of this directory's files and directories.
- .. <directory> (List of parent directory)
- Display all of the parent directory's files and directories.
- testAddCommandHandler.rex
- A Rexx demonstration program to show how to add and use a Rexx command
handler implemented in Java.
The companion Java program (implementing the Rexx command handler) is:
RedirectingCommandHandler.java.
Among other things it defines the commands
- HELLO
- INFO
- LOWERCASE [text]
... if "text" is omitted, then redirected "input" gets processed,
result is written to "output", if redirected,
else to redirected "error"
- PING
- ROT13 [text]
... if "text" is omitted, then redirected "input" gets processed,
result is written to "output", if redirected,
reprocessed data is written to "error", if redirected
- UPPERCASE [text]
... if "text" is omitted, then redirected "input" gets processed,
result is written to "output", if redirected,
else to redirected "error"
and demonstrates how to create failure and error conditions in the command handler if
no or an unknown command gets issued by the Rexx program.
To run enter the following command on the command line:
rexx testAddRedirectingCommandHandler.rex
Rony G. Flatscher, 2022-08-28, Wien/Vienna, Austria, Europe