If only IBM would port OOREXX to TSO!

Even when writing code that could just use a REXX BIF, I find it more 
convenient to use method invocations, e.g., len = stg~word(3)~length rather 
than len = length(word(stg,3)).

If you want to use OOREXX in Linux on Z, you might want the ANSI extension 
(WITH), in which case you'll need 5.0, which last I heard was in beta test.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Discussion List [[email protected]] on behalf of 
Rony G. Flatscher [[email protected]]
Sent: Tuesday, June 21, 2022 6:12 AM
To: [email protected]
Subject: Re: Some UNIX file usage questions

On 20.06.2022 19:26, David Crayford wrote:
> On 21/06/2022 1:07 am, Paul Gilmartin wrote:
>> On Mon, 20 Jun 2022 08:47:49 -0700, Charles Mills wrote:
>>>     ...
>>> The assembler routine will take as input a delay time in hundredths of a 
>>> second (because of
>>> STIMER), do a WAIT ECBLIST, and return one of
>>>
>>> 'T' -- the time expired
>>> 'P' -- the operator entered STOP
>>> 'F modify command operand' -- the operator entered MODIFY
>>>
>> What happens if the operator enters STOP during the (relatively minuscule)
>> fraction of time that Rexx, not Assembler is active?
>
> In that case the EXTRACT ECB will be posted and the routine will stop when it 
> is re-entered and
> the ECB is tested. I've written something similar myself for Lua. The 
> differnce is Lua is object
> oriented and holds state where REXX is not so it's a Frankenstien monster to 
> create a reusable
> context.
> It's hard to justify why anybody would do it for REXX when you can just code 
> a C++ program using
> __console() and a std::thread.

This is a question of philosophy in general.

"Name dropping" of computer programming languages does not substantiate 
assessment of a problem and
then thinking of the "best" solution for it. One criterium might be 
performance, another needed
resources,  another one is to solve a problem quickly (saving human time), 
another one is legibility
to improve understanding, maintainability, reduce errors, and many more.

One important criterium is definitely standardisation: this makes sure that in 
certain environments
basic programming skills can be relied on like in the mainframe world REXX or 
Java or Assembler. If
one is able to jump between different programming languages like Assembler, 
REXX, Lua, C++, Python,
Java, JavaScript, Perl, Ruby, ..., and the programs should be maintainable by 
others, preferably by
the shops where they get deployed, then one should not "jump around" languages, 
just because some
person is able to do so as the resulting code might lock-in the shops, make 
them dependent on the
authors/sellers.

---

Seeing that you sometimes stress the importance of object-orientness for 
various reasons (like
above) pointing at REXX incapability in that context, then seeing that you like 
to frame REXX with
all bad and negative emotions ("it's a Frankenstein monster") one wonders what 
is the agenda of such
a person.

Clearly, if it was possible to build on REXX skills and making it easy to e.g. 
exploit
object-oriented features, most notably the ability to define data structures 
with functions/methods
to maintain/interact with them ( a.k.a. "types","classes"), why not use the 
language IBM has
originally built as an object-oriented successor to REXX i.e. ooRexx? ooRexx is 
able to run Rexx
programs and allows optionally to define your own data 
structures/classes/types, plus it adds a
wealth of useful new features in an easy to learn and easy to use manner.

There are mainframe shops that use ooRexx as a mainframe port to the Linux 
subsystem has been existing.

---

Now if someone were to try out/explore ooRexx it may be interesting to extend 
ooRexx such that REXX
programmers who got accustomed to ooRexx may become able to interact 
with/exploit Java, noticing how
predominant Java is and how well it gets supported by IBM. (Heck, IBM even has 
an OpenJDK
distribution of its own! And not only IBM, even Microsoft, believe it or not, 
and Amazon, and
Bellsoft, and ...)

The interesting thing is, if the user, the programmer is in the center of 
endeavors like enhancing
REXX with object-oriented abilities such that the language remains easy, and 
then extends the
abilities to encompass all of Java, but using a dynamically typed, caseless 
programming language
like REXX or ooRexx, then it is likely that "normal" REXX programmers become 
quite quickly able to
instrumentate all important mainframe technologies from a Linux subsystem. (I 
teach beginners, BA
students!, in four months programming in a four hour lecture, the last two 
months they use and take
advantage of Java without a need to learn Java at all! The most important 
indredient is the
programming language: first introducing REXX then ooRexx.)

The external ooRexx function library to bridge [oo]Rexx and Java is called 
BSF4ooRexx and has been
in development and proven for more than 20 years. There are mainframe shops 
where this bridge gets
used with ooRexx to become able (again) to run their Rexx programs against DB2. 
The BSF4ooRexx
installation package has a precompiled library for the mainframe Linux 
subsystem aboard.

---

So the driving idea is to extend known and trusted skills and technologies. 
Here building on the
REXX skills.

The technologies are there, it is up to the interested REXX programmer to put 
their toes into the
water and then try it out as ooRexx is available for Windows, Linux, MacOS, the 
mainframe and others.

(Also, if you know/love C++ it may be interesting to know that it is quite easy 
to create external
ooRexx function packages, its native API is impressive. BSF4ooRexx uses it, 
making it - among other
things - possible to use [oo]Rexx as macro language for any Java application. 
This is being
exploited by JavaFX which can use [oo]Rexx as one of its scripting/macro 
languages out of the box!)

For those of you who have never seen ooRexx and want to know how it looks like 
and how it is based
on REXX, you may want to skim over the ten PDF pages at 
<https://secure-web.cisco.com/17js-sPO6VZWfEo-XEmOgal9UfLTLnpq3atQtyPmQSQOKFFp33_GE1KVdg7oSWE-8KxXtrVK1t5G16MXEkgoBIaF8dihdcZ95whHdTRjqsiBiNpp5WTV7vdLSu5ksRqYPpjWSLc4GnwIJlt4CO9pOiWbWhPcqa7rjUnN-1rSH2KouEmUjL7Wy6THPzQJbUrJeGWgZ-bardRv_v1PriPqVyLJC13IQpCFdE_vWGrarRcmjg-31aSSQKcpDNMrXHZSwfbbe9xukSyXhctJXfBG7cM2TFfz69C8By0YZlBQ-_bHyuMIqTv_vc4cbgM-1Cj_s7psfL-lcj9z1FLkL5Bmw6Doupof2U6fe1AS5edpqtb65DQyeYtMMrIDXq6TQCSk6EqPRhuwXe3cyZTn12z09ealigZreUFS0JuUn0Qhk_214IE6LOr7vB0g6FQrOCVmz/https%3A%2F%2Fepub.wu.ac.at%2F8118%2F>.
 The article
is "timeless" in the sense that everything it communicates is still actual and 
relevant. It is meant
as an easy introduction to REXX and ooRexx allowing one to assess a little bit 
the underlying
philosophy.

---

Ad one of the samples in this thread (writing to a file) in [oo]Rexx may be as 
simple as:

       call lineout 'somefile', 'hello, world !'

ooRexx extends the stream-BIF based functionality with a stream class/type of 
its own that allows
for reading from/writing to any device including file systems. However, one 
would use that
additional functionality only, if it adds some benefit, e.g. using an open 
stream as an argument to
a Rexx function (yes, ooRexx allows one to fetch arguments by reference 
including stems).

---

Lastly, if you are interested in writing Java programs, but do not want to 
learn Java, then use
NetRexx for that matter! NetRexx got created by the father of REXX, Mike F. 
Cowlishaw who - among
many other great skills and talents - has been an expert on the Java 
programming language more than
25 years ago.

NetRexx follows the REXX philosophy ("Java in the clothes of REXX") such that 
REXX programmers would
become able to create Java programs quickly, they usually just do not realize 
that!

IBM's NetRexx BTW was the first JVM language in the world!

NetRexx - like ooRexx - has been handed over to the non-profit SIG Rexx 
Language Assocation (RexxLA,
cf. 
http://secure-web.cisco.com/13MsPQ43LNrKcS6M9enEaKDRT1xDszq37QjhXWg8tcJMr4BP1QpFFQmCb9zQLVQzpXdmkAok-yiXj3LrwDXviBoC6dA41ZrJ6Jq_80ojMERzlTvbc0bTdGP-sYxVAG7RQUtejjlz-1m1EjO2Q05sjVN3F3pCafdB8hGDjjyH8OWZUgZOPddBrVaUP3a1mpVcEFZvEfz_cqwlGvaUxTB8j5UI6j_vjGyHiBlPDHHku5CfKVjTacPsHMPYAjCWKzrZil-egJrrjap3lWPfcX8UDVp1-RGlr9kgE77FPYnC6cTkSMJU0JIOwuyihziXV2pS-ElsTchoXCPvuKIE1vZrxGASd3YuMv-_xhKxtztU62b2oEX9JyOtzMLY2MNWVQO4CzsIbajfJb816dJ318tAqoFVXw0dii8e9K1C3tTZ7-xTBRIQyOQU4TKWK0FiXQzsX/http%3A%2F%2Fwww.RexxLA.org)
 by IBM. RexxLA has open sourced both languages and has been maintaining and
developing them.

Try them out, they are free! :)

---rony

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to