loadPackage OK for extension/stringChunk.cls loadPackage OK for utilities/indentedStream.cls loadPackage OK for extension/extensions.cls loadLibrary OK for rxunixsys loadPackage OK for ncurses.cls loadPackage OK for csvStream.cls loadLibrary OK for hostemu loadPackage OK for json.cls loadPackage OK for mime.cls loadPackage OK for rxftp.cls loadLibrary OK for rxmath loadPackage OK for rxregexp.cls loadPackage OK for regex/regex.cls loadPackage OK for smtp.cls loadPackage OK for socket.cls loadPackage OK for streamsocket.cls loadPackage OK for pipeline/pipe.cls loadPackage OK for rgf_util2/rgf_util2.rex loadPackage OK for BSF.CLS loadPackage OK for oorexxshell_queries.cls loadPackage OK for pipeline/pipe_extension.cls loadPackage OK for rgf_util2/rgf_util2_wrappers.rex loadPackage OK for icu4oorexx.cls REXX-ooRexx_4.3.0(MT)_64-bit 6.04 12 May 2026 Input queue name: S16da4Q600001980b60 -------------- -- ooRexxShell -------------- /* ooRexxShell, derived from rexxtry. */ /* This shell supports several interpreters: - ooRexx itself - the system address (cmd under Windows, sh or bash under Linux and MacOs) - PowerShell core (pwsh) - any other external environment (you need to modify ooRexxShell, search for hostemu for an example). */ /* The prompt indicates which interpreter is active. By default the shell is in ooRexx mode: ooRexx[bash]> When the interpreter is ooRexx, the value of address() is displayed between []. */ ooRexx[bash]> say "hello" hello ooRexx[bash]> say 1+2 3 ooRexx[bash]> /* If an ooRexx clause ends with "=" then the clause is transformed to display the result : '1+2=' becomes 'options "NOCOMMANDS"; 1+2 ; call dumpResult; options "COMMANDS"' '=' alone displays the current value of the variable RESULT. */ ooRexx[bash]> 1+2= 3 ooRexx[bash]> (1,2)= -- When "=" then the arrays are displayed in condensed form [ 1, 2] ooRexx[bash]> (1,2)== -- When "==" then the arrays are displayed one item per line an Array (shape [2], 2 items) 1 : 1 2 : 2 ooRexx[bash]> /* You have access to Java. */ ooRexx[bash]> jsystem = bsf.loadClass('java.lang.System') ooRexx[bash]> properties = jsystem~getProperties ooRexx[bash]> enum = properties~propertyNames ooRexx[bash]> do while enum~hasMoreElements; key=enum~nextElement; say "key:" left("["key"]",30) "value: ["properties~getProperty(key)"]"; end key: [java.runtime.name] value: [OpenJDK Runtime Environment] key: [java.vm.version] value: [23.0.2+9] key: [sun.boot.library.path] value: [/Users/Shared/local/java/jdk/bellsoft/jdk-23.0.2-full.jdk/lib] key: [java.vm.vendor] value: [BellSoft] key: [java.vendor.url] value: [https://bell-sw.com/] key: [path.separator] value: [:] key: [java.vm.name] value: [OpenJDK 64-Bit Server VM] key: [user.country] value: [FR] key: [java.vm.specification.name] value: [Java Virtual Machine Specification] key: [user.dir] value: [/Users/Shared/local/rexx/oorexx/executor/sandbox/jlf/demos] key: [java.vm.compressedOopsMode] value: [Zero based] key: [java.runtime.version] value: [23.0.2+9] key: [os.arch] value: [aarch64] key: [java.io.tmpdir] value: [/var/folders/f6/ls9l793n1bg444403jmfh1_m0000gp/T/] key: [line.separator] value: [ ] key: [java.vm.specification.vendor] value: [Oracle Corporation] key: [stderr.encoding] value: [UTF-8] key: [os.name] value: [Mac OS X] key: [sun.jnu.encoding] value: [UTF-8] key: [stdout.encoding] value: [UTF-8] key: [java.library.path] value: [/Users/Shared/local/rexx/oorexx/build/executor.master/sandbox/jlf/trunk/macos-arm64/clang/release/delivery/lib:/local/rexx/bsf4oorexx/BSF4ooRexx_install_v641-20221002-refresh/bsf4oorexx/lib:/local/rexx/bsf4oorexx/BSF4ooRexx_install_v641-20221002-refresh/bsf4oorexx/lib/macos-arm64::] key: [jdk.debug] value: [release] key: [java.class.version] value: [67.0] key: [java.specification.name] value: [Java Platform API Specification] key: [sun.management.compiler] value: [HotSpot 64-Bit Tiered Compilers] key: [os.version] value: [15.7.3] key: [http.nonProxyHosts] value: [local|*.local|169.254/16|*.169.254/16] key: [user.home] value: [/Users/jlfaucher] key: [user.timezone] value: [Europe/Paris] key: [file.encoding] value: [UTF-8] key: [java.specification.version] value: [23] key: [user.name] value: [jlfaucher] key: [java.class.path] value: [/local/rexx/bsf4oorexx/BSF4ooRexx_install_v641-20221002-refresh/bsf4oorexx/bsf4ooRexx-v641-20221002-bin.jar:] key: [java.vm.specification.version value: [23] key: [sun.arch.data.model] value: [64] key: [java.home] value: [/Users/Shared/local/java/jdk/bellsoft/jdk-23.0.2-full.jdk] key: [user.language] value: [en] key: [java.specification.vendor] value: [Oracle Corporation] key: [java.vm.info] value: [mixed mode, sharing] key: [java.version] value: [23.0.2] key: [native.encoding] value: [UTF-8] key: [java.vendor] value: [BellSoft] key: [java.awt.headless] value: [true] key: [file.separator] value: [/] key: [java.version.date] value: [2025-01-21] key: [java.vendor.url.bug] value: [https://bell-sw.com/support] key: [sun.io.unicode.encoding] value: [UnicodeBig] key: [sun.cpu.endian] value: [little] key: [socksNonProxyHosts] value: [local|*.local|169.254/16|*.169.254/16] key: [ftp.nonProxyHosts] value: [local|*.local|169.254/16|*.169.254/16] ooRexx[bash]> /* A shell command can be used in ooRexx mode, surrounded with quotes. */ ooRexx[bash]> 'ls -lap *demo*.txt' -rw-r--r--@ 1 jlfaucher wheel 1414 Mar 11 09:55 _readme-demos.txt -rw-r--r--@ 1 jlfaucher wheel 8854 Mar 4 06:52 executor-demo-array-output.txt -rw-r--r--@ 1 jlfaucher wheel 305774 May 31 2023 executor-demo-classic_rexx-output.txt -rw-r--r--@ 1 jlfaucher wheel 54867 Mar 4 06:41 executor-demo-extensions-output.txt -rw-r--r--@ 1 jlfaucher wheel 43331 Mar 4 01:25 executor-demo-text-compatibility-auto-conv-output.txt -rw-r--r--@ 1 jlfaucher wheel 43474 Mar 4 01:25 executor-demo-text-compatibility-output.txt -rw-r--r--@ 1 jlfaucher wheel 23941 Mar 4 01:25 executor-demo-text-internal_checks-output.txt -rw-r--r--@ 1 jlfaucher wheel 22371 Mar 4 01:25 executor-demo-text-output.txt -rw-r--r--@ 1 jlfaucher wheel 54577 Mar 4 01:25 executor-demo-text-unicode-output.txt -rw-r--r--@ 1 jlfaucher wheel 5514 Mar 3 23:28 ooRexxShell-demo-helpers-output.txt -rw-r--r--@ 1 jlfaucher wheel 14587 Mar 4 06:32 ooRexxShell-demo-interpreters-output.txt -rw-r--r--@ 1 jlfaucher wheel 538730 Mar 4 06:28 ooRexxShell-demo-queries-output.txt ooRexx[bash]> /* When not in ooRexx mode, you enter raw commands that are passed directly to the external environment. You switch from an interpreter to an other one by entering its name alone. To get the list of all interpreter names, enter this command: ?i[nterpreters] Under Linux & MacOs, this list includes the shells in /etc/shells. */ ooRexx[bash]> ?interpreters Interpreters: bash: to activate the bash interpreter. cmd: to activate the sh interpreter. command: to activate the sh interpreter. csh: to activate the csh interpreter. hostemu: to activate the HostEmu interpreter. ksh: to activate the ksh interpreter. oorexx: to activate the ooRexx interpreter. pwsh: to activate the pwsh interpreter. sh: to activate the sh interpreter. system: to activate the sh interpreter. tcsh: to activate the tcsh interpreter. zsh: to activate the zsh interpreter. [Info] 13 lines displayed ooRexx[bash]> /* 'cmd' 'command' and "system" are aliases to select the system interpreter. */ ooRexx[bash]> system sh> /* Now the default interpreter is the system shell. No need to surround the commands with quotes. */ sh> ls -lap *demo*.cast -rw-r--r--@ 1 jlfaucher wheel 38696 May 12 19:03 executor-demo-array.cast -rw-r--r--@ 1 jlfaucher wheel 392879 May 12 19:06 executor-demo-classic_rexx.cast -rw-r--r--@ 1 jlfaucher wheel 112369 May 12 19:14 executor-demo-extensions.cast -rw-r--r--@ 1 jlfaucher wheel 273592 May 12 20:50 executor-demo-text-compatibility-auto-conv.cast -rw-r--r--@ 1 jlfaucher wheel 287277 May 12 20:19 executor-demo-text-compatibility.cast -rw-r--r--@ 1 jlfaucher wheel 123872 May 12 19:35 executor-demo-text-internal_checks.cast -rw-r--r--@ 1 jlfaucher wheel 172826 May 12 19:47 executor-demo-text-unicode.cast -rw-r--r--@ 1 jlfaucher wheel 93924 May 12 19:26 executor-demo-text.cast -rw-r--r--@ 1 jlfaucher wheel 11166 May 12 20:51 ooRexxShell-demo-helpers.cast -rw-r--r--@ 1 jlfaucher wheel 20123 May 12 20:53 ooRexxShell-demo-interpreters.cast -rw-r--r--@ 1 jlfaucher wheel 667133 Mar 4 06:28 ooRexxShell-demo-queries.cast sh> /* HostEmu is a subcommand environment that partially emulates a TSO/CMS environment. */ sh> hostemu HostEmu> /* Now the default interpreteur is HostEmu. No need to surround the commands with quotes. */ HostEmu> /* EXECIO is an I/O mechanism. The following command will read the 10 first lines from the file "_readme-demos.txt". They are stored in the stem named "lines.". */ HostEmu> execio 10 diskr "_readme-demos.txt" (finis stem lines. HostEmu> /* When in HostEmu mode, the ooRexx expressions are not recognized */ HostEmu> lines.= hostemu: bad PLIST, token "syntax error" RC= 24 HostEmu> /* You can switch temporarily to ooRexx to display the result. For that, start your command line with "oorexx". */ HostEmu> oorexx lines.= a Stem (11 items) 0 : 10 1 : 'Demonstration scripts.' 2 : 'ooRexxShell has a demo mode with slow display.' 3 : '' 4 : 'https://asciinema.org/ asciinema Terminal session recorder' 5 : 'https://github.com/theZiz/aha aha Ansi HTML Adapter.' 6 : '' 7 : 'Current demos:' 8 : 'executor-demo-array.rex' 9 : 'executor-demo-classic_rexx.rex' 10 : 'executor-demo-extensions.rex' HostEmu> /* Switch to PowerShell core. pwsh */ HostEmu> pwsh pwsh> /* Now the default interpreter is pwsh. No need to surround the commands with quotes. */ /* Find the commands containing "rexx": */ pwsh> get-command *rexx* | select -property name, source Name Source ---- ------ oorexxshell /local/rexx/oorexx/executor/incubator/ooRexxShell/oorexxshell oorexxshell.rex /local/rexx/oorexx/executor/incubator/ooRexxShell/oorexxshell.rex oorexx_collect_docfiles /Users/Shared/local/rexx/builder/scripts/oorexx_collect_docfiles oorexx_vars /Users/Shared/local/rexx/builder/scripts/oorexx_vars rexx /Users/Shared/local/rexx/oorexx/build/executor.master/sandbox/jlf/trunk/macos-arm64/clang/release/delive… rexx.cat /Users/Shared/local/rexx/oorexx/build/executor.master/sandbox/jlf/trunk/macos-arm64/clang/release/delive… rexx.img /Users/Shared/local/rexx/oorexx/build/executor.master/sandbox/jlf/trunk/macos-arm64/clang/release/delive… rexxc /Users/Shared/local/rexx/oorexx/build/executor.master/sandbox/jlf/trunk/macos-arm64/clang/release/delive… rexxscriptlib.rex /Users/Shared/local/rexx/builder/scripts/rexxscriptlib.rex rexxtry.rex /Users/Shared/local/rexx/oorexx/build/executor.master/sandbox/jlf/trunk/macos-arm64/clang/release/delive… run_testOORexx /Users/Shared/local/rexx/builder/scripts/run_testOORexx setenv-oorexx /Users/Shared/local/rexx/builder/scripts/setenv-oorexx setenv-rexx /Users/Shared/local/rexx/builder/scripts/setenv-rexx setenv-rexxlocal /Users/Shared/local/rexx/builder/scripts/setenv-rexxlocal pwsh> /* Same command, send the output to the rexx queue without the table headers. The empty lines are still in the output, they will be filtered on ooRexx side. */ pwsh> get-command *rexx* | select -property name, source | format-table -HideTableHeaders | rxqueue pwsh> /* Collect the lines of the rexx queue in an array, and then parse the lines to create an ooRexx directory. */ pwsh> oorexx .rexxqueue~new~makearray~select{item <> ""}~reduce(.directory~new){parse value item~space with name source; accu[name]=source}= a Directory (14 items) 'oorexxshell' : '/local/rexx/oorexx/executor/incubator/ooRexxShell/oorexxshell' 'oorexxshell.rex' : '/local/rexx/oorexx/executor/incubator/ooRexxShell/oorexxshell.rex' 'oorexx_collect_docfiles' : '/Users/Shared/local/rexx/builder/scripts/oorexx_collect_docfiles' 'oorexx_vars' : '/Users/Shared/local/rexx/builder/scripts/oorexx_vars' 'rexx' : '/Users/Shared/local/rexx/oorexx/build/executor.master/sandbox/jlf/trunk/macos-arm64/clang/release/deliver…' 'rexx.cat' : '/Users/Shared/local/rexx/oorexx/build/executor.master/sandbox/jlf/trunk/macos-arm64/clang/release/deliver…' 'rexx.img' : '/Users/Shared/local/rexx/oorexx/build/executor.master/sandbox/jlf/trunk/macos-arm64/clang/release/deliver…' 'rexxc' : '/Users/Shared/local/rexx/oorexx/build/executor.master/sandbox/jlf/trunk/macos-arm64/clang/release/deliver…' 'rexxscriptlib.rex' : '/Users/Shared/local/rexx/builder/scripts/rexxscriptlib.rex' 'rexxtry.rex' : '/Users/Shared/local/rexx/oorexx/build/executor.master/sandbox/jlf/trunk/macos-arm64/clang/release/deliver…' 'run_testOORexx' : '/Users/Shared/local/rexx/builder/scripts/run_testOORexx' 'setenv-oorexx' : '/Users/Shared/local/rexx/builder/scripts/setenv-oorexx' 'setenv-rexx' : '/Users/Shared/local/rexx/builder/scripts/setenv-rexx' 'setenv-rexxlocal' : '/Users/Shared/local/rexx/builder/scripts/setenv-rexxlocal' pwsh> /* Back to the ooRexx interpreter, by entering "oorexx" alone. */ pwsh> oorexx ooRexx[bash]> say "The default interpreter is now ooRexx" The default interpreter is now ooRexx ooRexx[bash]> /* End of demonstration. */