NetRexx Examples (Running ooRexx Scripts from NetRexx)

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.
nrxRunRexx_01.nrx
Defines and runs a Rexx program. The compiled Java class is stored in "nrxRunRexx_01.class". [Java version: JavaRunRexx_01.java.]
nrxRunRexx_02.nrx
Preloads the Rexx interpreter, defines and runs a Rexx program. The compiled Java class is stored in "nrxRunRexx_02.class". [Java version: JavaRunRexx_02.java.]
nrxRunRexx_03.nrx
Defines and runs a Rexx program, that returns an ooRexx directory, which then is used from NetRexx (Java). The compiled Java class is stored in "nrxRunRexx_03.class". [Java version: JavaRunRexx_03.java.]
nrxRunRexx_04.nrx
Defines and runs a Rexx program, that contains a syntax error, which then is intercepted and inspected by NetRexx (Java). The compiled Java class is stored in "nrxRunRexx_04.class". [Java version: JavaRunRexx_04.java.]
nrxRunRexx_05.nrx
Demonstrate how to setup a .host directory in Rexx from NetRexx (Java), which then receives Java objects for use in Rexx programs; in addition a value is saved in .host by Rexx under the index REXX.HEY that upon return is fetched from NetRexx (Java). [Java version: JavaRunRexx_05.java.]
nrxRunRexx_06.nrx
Demonstrate how to use the context of a Rexx routine (i.e. all public routines and public classes available to it) for another Rexx routine.
The first routine requires BSF.CLS which adds public routines and public classes which then are made available to Rexx routines that get created and executed later via NetRexx (Java). In addition the ooRexx standard streams get redirected to the Java standard streams by calling the public routine bsf.redirectTo.
Then another Rexx routines gets defined to use the first package, and in addition defines a public routine named test.
Finally, the last Rexx routine demonstrates getting access to the package of the second routine which makes its public routine named test accessible. In addition the last routine is called twice, once without NetRexx (Java) supplied arguments, once with NetRexx (Java) supplied arguments. [Java version: JavaRunRexx_06.java.]
rgf_01_runRexx.nrx
Shows the output of parse source and parse version from Rexx and NetRexx. The compiled Java class is stored in "rgf_01_runRexx.class".
rgf_02_runRexxArg.nrx
Supplying an argument from NetRexx to a Rexx program. The compiled Java class is stored in "rgf_02_runRexxArg.class".
rgf_03_runRexxGetReturnValue.nrx
Supplying an argument from NetRexx to a Rexx program, retrieving a Rexx return value in NetRexx. The compiled Java class is stored in "rgf_03_runRexxGetReturnValue.class".
rgf_04_runRexxGetReturnValue.nrx
NetRexx uses Rexx to query the PATH environment variable. The compiled Java class is stored in "rgf_04_runRexxGetReturnValue.class".
rgf_05_runRexxEnvironment.nrx
NetRexx uses Rexx to query and set an environment variable called RexxLA. The compiled Java class is stored in "rgf_05_runRexxEnvironment.class".
jsr223 ("javax.script")
Demonstrates how to take advantage of the Java scripting framework (cf. Java package e.g. at "javax.script") introduced with Java 6.


Rony G. Flatscher, 2011-01-15, 2014-07-11, 2015-06-04, Wien/Vienna, Austria, Europe