Hi Jeff,
On 18.09.2024 01:17, Jeffrey Hennick wrote:
I have run into a problem trying NetRexx under the newest oorexxshell. This is on a Windows 11 /
WSL Ubuntu laptop. I have been following the sequence listed below. It all works (except where
it says "Need extended ooRexx")
When does "Need extended ooRexx" appear, how do you get it?
until I get to the NetRexx command *run nrc -exec which_rexx.rex*. It looks like it does not know
about nrc.
It will.
Then I tried it as a direct command.
... cut ...
While I don't know enough of what is going on, it looks like the *setup* routine kept the existing
path to NetRexx and added its own, so somehow the wrong NetRexxF.jar gets called, it apparently
has problems. -?-
Any help would be very welcome.
The portable net-oo-rexx package is meant to not change an installation. Rather its "setup" will
create a "run" and a "setenv" command that will prepend the paths to the net-oo-rexx packages to
PATH and CLASSPATH leaving it otherwise intact.
In a session you can use then to run the oorexxshell from Jean Louis, which is part of the
net-oo-rexx package like this:
run oorexxshell
This command does the following:
* the "run" script changes the environment variables PATH and CLASSPATH to
have the net-oo-rexx
packages placed in front of everything,
* it then will run the "oorexxshell" script which loads the versatile
"oorexxshell", which itself
loads all its packages
In my case the following gets displayed:
E:\DropBox\Dropbox\xfer\oorexxshell\net-oo-rexx.windows.x86_64-portable-release-20240827>run
oorexxshell
loadPackage OK for C:\Users\Administrator\.config\oorexxshell\custom1.rex
loadPackage OK for extension/stringChunk.cls
loadPackage OK for utilities/indentedStream.cls
loadPackage OK for extension/std/extensions-std.cls
loadPackage OK for procedural/dispatcher.cls
loadPackage OK for oodialog.cls
loadPackage OK for winsystm.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 jdor.cls
loadPackage OK for oorexxshell_clauser.cls
REXX-ooRexx_5.1.0(MT)_64-bit 6.05 21 Jul 2024
Input queue name: S0000000000001848Q000001B1CB35D210
E:\DropBox\Dropbox\xfer\oorexxshell\work
ooRexx[CMD]>
The prompt "ooRexx[CMD]" indicates that it is ooRexx that will process your entries and that its
default address environment is "CMD", the Windows cmd.exe command line interpreter. You could change
that default address to e.g. JDOR which is available via BSF4ooRexx (BSF.CLS was loaded successfully
if you look up the loaded packages above) by entering:
ooRexx[CMD]> address jdor
Duration: 0
E:\DropBox\Dropbox\xfer\oorexxshell\work
ooRexx[JDOR]> say address()
JDOR
Duration: 0
E:\DropBox\Dropbox\xfer\oorexxshell\work
ooRexx[JDOR]>
So by default oorexxshell will hand over every entry for ooRexx to execute. (As long as you run
oorexxshell the changed environment will stay set to what the "run" script defined.)
Now, your entry:
ooRexx[CMD]> nrc -exec which_rexx.rex
is taken as a Rexx statement that deducts "exec" from "nrc" and appends "WHICH_REXX.REX" to the
result, but nrc is not a Rexx variable such that it evaluates to "NRC" - a string - causing the error:
Nonnumeric value ("NRC") used in arithmetic operation.
Error code= 41.1
If your current shell is ooRexx then you would have to enquote the command to have ooRexx pass it to
CMD, so this is what you should enter in this case:
ooRexx[CMD]> "nrc -exec which_rexx.rex"
Or, you could change the command interpreter from ooRexx to CMD by entering
"cmd"
ooRexx[CMD]> cmd
E:\DropBox\Dropbox\xfer\oorexxshell\work
cmd>
And then you can enter the command without quotes:
cmd> nrc -exec which_rexx.rex
yielding the output:
java -cp
"E:\DropBox\Dropbox\xfer\oorexxshell\net-oo-rexx.windows.x86_64-portable-release-20240827\packages\bsf4oorexx\lib\*;.;C:\Users\Administrator\BSF4ooRexx\lib\*;E:\DropBox\Dropbox\xfer\oorexxshell\net-oo-rexx.windows.x86_64-portable-release-20240827\packages\..\netrexx\lib\NetRexxF.jar;E:\DropBox\Dropbox\xfer\oorexxshell\net-oo-rexx.windows.x86_64-portable-release-20240827\packages\bsf4oorexx\lib\*;.;C:\Users\Administrator\BSF4ooRexx\lib\*;E:\DropBox\Dropbox\xfer\oorexxshell\net-oo-rexx.windows.x86_64-portable-release-20240827\packages\..\netrexx\lib\NetRexxF.jar;C:\Program
Files\BSF4ooRexx850\lib\*;.;C:\Users\Administrator\BSF4ooRexx\lib\* ;;."
-Dnrx.compiler=ecj
org.netrexx.process.NetRexxC -exec which_rexx.rex
NetRexx portable processor 4.06-GA build 152-20240304-0612
Copyright (c) RexxLA, 2011,2024. All rights reserved.
Parts Copyright (c) IBM Corporation, 1995,2008.
Program which_rexx.rex
===== Exec: which_rexx =====
parse version: NetRexx 4.06 03 Mar 2024
parse source : Java method which_rexx.rex
directory() : E:\DropBox\Dropbox\xfer\oorexxshell\work
Processing of 'which_rexx.rex' complete
Duration: 0.703000
E:\DropBox\Dropbox\xfer\oorexxshell\work
cmd>
It gives you the duration of the command nevertheless (in this case NetRexx gets loaded, the script
in "which_rexx.rex" gets compiled to Java and then the Java class gets executed).
To switch back to the ooRexx shell you would enter:
cmd> oorexx
E:\DropBox\Dropbox\xfer\oorexxshell\work
ooRexx[CMD]>
The ooRexx shell allows you to get at help by entering a question mark:
ooRexx[CMD]> ?
Queries:
?: display help.
?bt: display the backtrace of the last error (same as ?tb).
?d[ocumentation]: invoke ooRexx documentation.
?i[nterpreters]: interpreters that can be selected.
?s[ettings]: display ooRexxShell's settings.
?sf: display the stack frames of the last error.
?tb: display the traceback of the last error (same as ?bt).
?v[ariables]: display the defined variables.
Commands:
/* alone: Used in a demo to start a multiline comment. Ended by */
alone.
< filename: read the file and put each line in the queue.
color off|on: deactivate|activate the colors.
color codes off|on: deactivate|activate the display of the color codes.
debug off|on: deactivate|activate the full trace of the internals of
ooRexxShell.
demo off|on|fast: deactivate|activate the demonstration mode.
exit: exit ooRexxShell.
goto <label>: used in a demo script to skip lines, until <label>: (note
colon) is reached.
indent+ | indent-: used by the command < to show the level of inclusion.
infos off|on|next: deactivate|activate the display of informations
after each execution.
prompt off|on [a[ddress]] [d[irectoy]] [i[nterpret]]:
deactivate|activate the display of
the prompt components.
readline off: use the raw parse pull for the input.
readline on: delegate to the system readline (history, tab completion).
reload: exit the current session and reload all the packages/libraries.
security off: deactivate the security manager. No transformation of
commands.
security on : activate the security manager. Transformation of commands.
sleep [n] [no prompt]: used in demo mode to pause during n seconds
(default 2 sec).
test regression: activate the regression testing mode.
trace off|on [d[ispatch]] [f[ilter]] [r[eadline]]
[s[ecurity][.verbose]]:
deactivate|activate the trace.
trap off|on [l[ostdigits]] [nom[ethod]] [nos[tring]] [nov[alue]]
[s[yntax]]:
deactivate|activate the conditions traps.
Input queue name: S0000000000001848Q000001B1CB35D210
E:\DropBox\Dropbox\xfer\oorexxshell\work
ooRexx[CMD]>
If you want to learn the different shells (command interpreters) that ooRexxShell can offer on your
system, you just enter "?i" which on my Windows 10 system yields:
ooRexx[CMD]> ?i
Interpreters:
cmd: to activate the cmd interpreter.
command: to activate the cmd interpreter.
hostemu: to activate the HostEmu interpreter.
oorexx: to activate the ooRexx interpreter.
pwsh: to activate the pwsh interpreter.
system: to activate the cmd interpreter.
E:\DropBox\Dropbox\xfer\oorexxshell\work
ooRexx[CMD]>
ooRexxShell can do so much more, hence it pays to invest a couple of minutes and check out the very
nice ASCINEMA tutorials by Jean Louis at:
https://jlfaucher.github.io/executor.master/demos/index.html
The first three tutorials are about ooRexxShell, just look through them, they are really informative
and very interesting, here the direct links:
* https://jlfaucher.github.io/executor.master/demos/index.html#interpreters
* https://jlfaucher.github.io/executor.master/demos/index.html#queries
* https://jlfaucher.github.io/executor.master/demos/index.html#helpers
(The tutorials about "executor" are about a special version of ooRexx that Jean Louis has created
and enhanced with many different interesting features to experiment with, including full Unicode
support.)
HTH
---rony
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel