Commands via Rexx (Re: REXX vs other languages WAS: Rexx numeric digits and scientific notation question

2024-04-23 Thread Rony G. Flatscher

On 23.04.2024 05:03, Andrew Rowley wrote:

On 23/04/2024 11:55 am, Paul Gilmartin wrote:

On Tue, 23 Apr 2024 10:59:47 +1000, Andrew Rowley  wrote:

    ...
To me, it is much clearer to be explicit, including the concatenation, e.g.
"DELETE " || foo

That overkill is apt to confuse a POSIX shell partisan who would
see the blank as part of the command name


Isn't Rexx assembling it all into one string, which gets then run as the 
command?

There can be significant spaces between parts of the command, and no spaces allowed in other 
parts. So you could have e.g.


"DELETE ABC" || suffix
or
"DELETE" prefix || suffix
which is very different from
"DELETE" prefix suffix

and it can get much more complex. I would rather use a consistent concatenation operator and 
explicitly insert spaces rather than rely on getting the right concatenation operator in the right 
place.


It's a matter of style, but there are some things that just look like potential bugs to me. 


The nice thing is that Rexx allows different variants of string concatenations and one is free to 
use what seems to be the "easiest", the "safest". Personally I use blank concatenations by default 
and abuttal or || only if there really should not be a single blank between the concatenated strings 
which is very rarely the case. Again, YMMV.


---

At  you will find a Rexx program at 
the top that uses Java2D to create and save a bitmap which is shown underneath (among many other 
things it demos how to define a specific font and get the dimensions of a string in that font in 
order become able to center the string on that bitmap and how to color that string freely).


If you look at the Rexx code (98% is classic Rexx) it may be surprising how the commands and the 
Rexx language integrate together well (the syntax coloring of the code stems from IntelliJ and the 
aforementioned ooRexx plugin).


As you can probably see the way Rexx allows one to use a command language like JDOR is really 
impressive (just look how one can intermix Rexx expressions with JDOR commands)!


The point here is: none of these JDOR commands are variables, they are commands (e.g. drawLine), 
more specifically here they are plain Rexx symbols. They get uppercased by Rexx and then handed over 
to the command handler to process it. In this case adding NOVALUE would force you to enquote all the 
commands which is cumbersome and also looks quite strange thereafter.


---rony

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: REXX vs other languages WAS: Rexx numeric digits and scientific notation question

2024-04-20 Thread Rony G. Flatscher

On 20.04.2024 19:52, Paul Gilmartin wrote:

On Sat, 20 Apr 2024 20:17:36 +, Robert Prins wrote:


Try the two characters that are pretty much unique to REXX, "!" and "?"
especially for small local loops.


Ugh!  But I confess I've done likewise at times.

I tried to refresh my memory and observed that the Rexx Ref.,
SA32-0972-60, is woefully inconsistent in its use f "symbol":

In Chapter 2. REXX general concepts 9
 Symbols:
 Symbols are groups of characters, selected from the: ...

But in Appendix E. REXX symbol and hexadecimal code cross-reference
 "Symbol" apparently means a single character.

Pubs oughta straighten that out.


Or .

---rony

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: REXX vs other languages WAS: Rexx numeric digits and scientific notation question

2024-04-20 Thread Rony G. Flatscher

On 20.04.2024 17:40, Paul Gilmartin wrote:

On Sat, 20 Apr 2024 11:08:03 -0400, Bob Bridges wrote:

It was while I was coding in REXX that I tried abutting a variable named 'x' 
with another string, and couldn't figure out why the program behaved as it did. 
 Eventually figured out I had inadvertently created a hex constant.  Maybe as 
an overreaction, I have never since used one-character variable names, always 
two or more.  (What do I use for loop counters?, you ask.  I use 'j' plus 
another letter; 'jr' for records, for example, 'jd' for days whatever.  More 
obvious would have been 'i', but there are too many two-letter reserved words 
even in REXX that start with 'i'.)


There are *no* reserved words in Rexx like in many other languages. (This alleviates one to have to 
learn them by heart. But more importantly, should the language get additional keywords over time 
they would not break existing Rexx programs that happen to use them already, unlike other 
programming languages.)



I like to use longer names with mnemonic value as control variables and,
if the body of the loop is more than a couple lines, cite the control
variable at the END so the interpreter verifies nesting.

Rexx is chaotic in context sensitivity of reserved words and in symbols'
being evaluated almost everywhere with exceptions for e.g. ADDRESS.


There are no reserved keywords therefore it is interesting that you see something chaotic there. But 
maybe some of the fundamental Rexx rules are not really known or possibly forgotten over time.


The Rexx rules are quite simple:

 * everything outside of quotes gets uppercased,

 o the content of quoted strings can be anything and never gets changed 
(truly immutable),

 * blanks around operators get removed,

 * a blank between literals and symbols is the blank concatenation operator

 * a symbol that was not assigned a value evaluates to the symbol itself (its 
name which is the
   uppercased string), otherwise it evaluates to its currently assigned value

The next step is to determine what kind of an instruction the resulting string represents in order 
to carry it out:


 * if the second token is an equal sign then it is an assignment instruction 
that gets carried out:
   the expression right of the equal sign (RHS) gets evaluated and assigned to 
the symbol (e.g.
   ABC=3+4) to the left of the equal sign (LHS),

 * if it is not an assignment instruction and the first symbol is a keyword 
then it is a keyword
   instruction that gets carried out,

 * if it is neither then the resulting string is a command instruction which 
gets handed over to
   the operating system for execution, the command's return code can be 
inspected immediately upon
   return by using the Rexx variable RC (set by Rexx to make the return code of 
the command
   immediately available to the Rexx program).

The ADDRESS keyword instruction is just one of the keyword instructions of Rexx which will allow to 
control to which Rexx command handler the command instruction gets sent to (among other things the 
ADDRESS instruction allows to switch among different Rexx command handlers).



Variable precision arithmetic is a boon.  But there is no convenient
library of elementary functions, probably the reason for the lack of
elementary functions in Rexx.


This depends what functionalities you are missing/seeking. There are quite a few Rexx function 
libraries, many implemented in Assembler or C++.


If using ooRexx there is a free, open-source ooRexx-Java bridge available which will make 
immediately *all* Java class libraries there are and all their functionality available to ooRexx, 
really, all of them! The external function and class libraries in this case are not implemented in 
C++ or Assembler, but in Java. And Java has become *fast*, one of the fastest languages there is.


If you look at Java and its standard runtime environment (JRE) you hardly miss any functionality 
there, from GUIs, to XML processing to secure Internet programming etc. E.g. if you have a need to 
transport data via SSL/TLS you get that infrastructure from the JRE for free at your fingertips (on 
all platforms) and can exploit it from Java, and with the ooRexx-Java bridge installed also directly 
from ooRexx.


Anyway, it is hard to conceive functionality that could not be made available to Rexx/ooRexx one way 
or the other.


---rony

--
--
__

Prof. Dr. Rony G. Flatscher
Department Wirtschaftsinformatik und Operations Management
Institut für Wirtschaftsinformatik und Gesellschaft
D2c 2.086
WU Wien
Welthandelsplatz 1
A-1020  Wien/Vienna, Austria/Europe

http://www.wu.ac.at
__




--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message

Re: REXX vs other languages WAS: Rexx numeric digits and scientific notation question

2024-04-19 Thread Rony G. Flatscher

On 19.04.2024 01:50, Andrew Rowley wrote:

On 18/04/2024 8:29 pm, Rony G. Flatscher wrote:
The mileage of people here vary including the Java people themselves who have started to reduce 
the need of explicit declarations like the new "var" (imitating JavaScript) instead of strict 
types or foregoing the static main method such that one can at least code the main method without 
the explicit declarations. The motivation about these changes is to make Java easier, reduce 
typing needs and the like.


The Java var keyword is more like C# than Javascript. The variable still has a strict type - you 
can only use var if the compiler can figure out the type from other information e.g.


var start = ZonedDateTime.now();

start is a ZonedDateTime. You can't use it before it is defined, you can't assign anything other 
than a ZoneDateTime to it, you can't create a new variable called start in the same scope, whether 
or not it is a ZoneDateTime. You can't e.g compare it to a LocalDateTime without specifying a 
timezone for the LocalDateTime - that is one of those things that helps avoid errors.


var just reduces redundant code, e.g. specifying the type twice in the same 
statement.


It is an attempt to apply dynamic typing to reduce the need to write the explicit type. This service 
gets carried out by the compiler. In true dynamically typed languages you can reuse variables like 
"start" or "tmp" to refer to values of different types. The context of interacting with them will 
determine whether the interaction is correct or not, maybe an example:


   a=123-- a number
   b="456"-- a number
   say a+b  -- yields: 579

   b='xyz' -- a string
   say a+b  -- yields: Bad arithmetic conversion. Nonnumeric value 
("xyz") used in arithmetic operation.

   b=.dateTime~new  -- current date and time
   say b-- will display the current date and time, e.g: 
2024-04-19T15:51:51.249000
   say b~addWeeks(17) -- yields: 2024-08-16T15:51:51.249000

   say a+b  -- yields: Bad arithmetic conversion. Nonnumeric value ("a 
DateTime") used in arithmetic operation.

A dynamic language when executing code needs nevertheless to check whether interaction with the 
dynamically typed values is correct or not.


Of course a static and statically typed languages with a compiler must define as much rules as 
possible, such that the compiler can check for them all. The more rules the more time consuming 
and the more difficult to learn a language.


I think the syntax rules for Rexx are actually more complex than Java, because it is less likely 
to flag an error if you do something that's not actually what you want. 


No the Java syntax is all in all much more complex. You note that when teaching novices Java and 
compare that to teaching novices Rexx or ooRexx (I have experiences in both).


E.g. string concatenation where variables are expected to be strings but maybe not, might not be 
initialized, sometimes you need vertical bars but not always etc. 


Well in Rexx concatenation rules are quite intuitive, surprisingly there is a blank concatenation 
operator (a blank between concatenated strings), an abuttal concatenation operator (no blank between 
concatenated strings) and using the explicit concatenation operator || (no blank between 
concatenated strings). Novices have no problems to understand:


   a=1
   say a "- hello!"   -- concatenation with a blank ...: 1 - hello!
   say a"- hello!"-- abuttal, concatenation without a blank: 1- 
hello!
   say a || "- hello!"-- concatenation with || operator ...: 1- 
hello!

In Java (and many other programming languages) there is only the + concatenation operator available 
(equivalent to Rexx' || operator), therefore one has always to use the + operator and has to write 
something like:


   int a=1;
   System.out.println(a+" - hello!"); // blank between both
   System.out.println(a+"- hello!");  // no blank between both

Of course this works, but it forces you to always use the + operator, whereas in the Rexx example it 
does not, yet the Rexx statements are intuitively understood by novices. So this does not add 
complexity per se.


Ad uninitialized variables: this is usually a no go in statically typed programming languages, the 
Java compiler therefore warns about it and uses default values wherever possible which is fine.


Rexx defines the value of variables that have no explicit value assigned to them to be the name of 
the variable in uppercase, so it does not cause a problem. (It does cause problems for programmers 
who got trained to always make sure that a value is assigned to variables. This is the reason why 
ooRexx has an option to activate checking for the use of uninitialized variables in Rexx programs to 
appease those who are not accustomed to

Re: REXX vs other languages WAS: Rexx numeric digits and scientific notation question

2024-04-19 Thread Rony G. Flatscher

On 18.04.2024 15:14, Bob Bridges wrote:

I don't often admit it, because I expect to get flamed for it, but in fact when 
I write in VBA almost all my variables are type VAR - that is, I hardly ever 
use the Dim statement to assign a type.  To introduce an array, sure, or to 
maintain correct spelling in the longer var names.  But it's rare indeed that I 
feel the need to specify that a variable is going to be BYTE, STRING or 
whatever.

So obviously, coding in typeless REXX doesn't bother me .


:-)

Seeing that you do quite a lot with OLE via VBA it may be interesting to take advantage of ooRexx 
5.1 [1] little "oleinfo" utility [2] (see "oorexx\samples\ole\oleinfo" programs "createOleInfo.rex", 
"getOleConstants.rex", and "listProgIds.rex"). For those interested about OLE and what one can do 
with it see [3].


The generated HTML documentation about the OLE interfaces to Windows programs can be used for ooRexx 
and VBA alike.


HTH

---rony

[1] : Installation packages for oorexx 5.1: 
<https://sourceforge.net/projects/oorexx/files/oorexx/5.1.0beta/>.


[2]: OLEInfo Utility: 
<https://wi.wu.ac.at/rgf/wu/lehre/autowin/material/foils/130_AutoWin_oleinfo_V04.pdf>


[3]: OLE and Nutshell Examples: 
<https://wi.wu.ac.at/rgf/wu/lehre/autowin/material/foils/110_AutoWin_V18.pdf>



-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Rony G. Flatscher
Sent: Thursday, April 18, 2024 06:30

The mileage of people here vary including the Java people themselves who have started to 
reduce the need of explicit declarations like the new "var" (imitating 
JavaScript) instead of strict types or foregoing the static main method such that one can 
at least code the main method without the explicit declarations. The motivation about 
these changes is to make Java easier, reduce typing needs and the like.

--- On 18.04.2024 02:22, Andrew Rowley wrote:

I find Rexx difficult because explicit declarations and static typing (as well 
as tightly controlled scopes) actually make programming easier, in general.  
They show up bugs in the code and make it easier to write correct programs.


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: REXX vs other languages WAS: Rexx numeric digits and scientific notation question

2024-04-18 Thread Rony G. Flatscher

On 18.04.2024 02:22, Andrew Rowley wrote:

On 18/04/2024 4:39 am, Rony G. Flatscher wrote:

As you know already Rexx it would be easy for you to learn about what ooRexx 
adds to Rexx.


...

Notabene: you write one ooRexx program that will be runnable without any changes on Windows, 
Linux and macOS. This means you develop it e.g. on Windows at home and execute it in a Linux 
s390x subsystem at work and vice versa. ;)

...
A dynamic and dynamically typed language as ooRexx allows to forgo many of the declarations a 
static and statically typed language mandates, thereby simplifying coding quite considerably.



I find Rexx difficult because explicit declarations and static typing (as well as tightly 
controlled scopes) actually make programming easier, in general. 


That is interesting and fine.

They show up bugs in the code and make it easier to write correct programs. 


The mileage of people here vary including the Java people themselves who have started to reduce the 
need of explicit declarations like the new "var" (imitating JavaScript) instead of strict types or 
foregoing the static main method such that one can at least code the main method without the 
explicit declarations. The motivation about these changes is to make Java easier, reduce typing 
needs and the like.


Of course a static and statically typed languages with a compiler must define as much rules as 
possible, such that the compiler can check for them all. The more rules the more time consuming and 
the more difficult to learn a language.



The IDE is also an important factor.


Yes, indeed.

In the case that you use IntelliJ (available for all major platforms) you could add the ooRexx 
plugin which syntax checks and syntax highlights normal Rexx programs and ooRexx programs. There is 
even a mode for mainframe REXX programs in it. The ooRexx IntelliJ plugin can be downloaded from 
<https://sourceforge.net/projects/bsf4oorexx/files/Sandbox/aseik/ooRexxIDEA/GA/2.2.0/>. You download 
the zip archive and have IntelliJ load it in its plugin menu, just follow the instructions on that page.


One feature you get with this plugin is a documentation feature of Rexx and ooRexx programs (just 
use the right mouse button).



I already write programs on my Windows laptop and run them on z/OS using Java 
:-)


Yes, that makes sense! :)

---rony

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: REXX vs other languages WAS: Rexx numeric digits and scientific notation question

2024-04-18 Thread Rony G. Flatscher

On 17.04.2024 21:04, Bob Bridges wrote:

This whole post was fascinating me, partly because I'm still a novice at 
ooRexx, still wrapping my head around certain concepts (messaging being one 
example).  I may as well say, though, that when I finally broke down and got 
myself a copy, I then took not one hour but two or three days off to read the 
documentation before I started writing the program I had in mind.  There was so 
much more to it than I expected, having believed that it would be simply 
TSO-REXX with object support.

Messaging...As I said, I'm still wrapping my head around that.  I'm used to creating 
classes and then invoking their methods; to use the term "message" in this 
connection causes my brain to pause temporarily.  So far the only thing I've worked out 
is that messaging ~is~ invoking a class' method, that is, it's just another way of saying 
the same thing.  But the way you describe it, I suspect I'm missing something.


My take is that people tend to believe that there is more to the messaging 
paradigm than there is. :)

Think of a message expression to be something comparable to a call instruction or a function 
invocation, it will cause code to be executed like the others.


The nice thing about the message paradigm "receiver~message" is that the receiver is responsible to 
find a method (a routine defined in its structure, class, type) and invoke it. The receiver will 
take the name of the received message and starts to look for a method by the same name in its own 
class (the structure used to create the receiver). If the method is not found by the receiver, the 
receiver will look up the immediate superclass for the method and if not found, that superclass' 
superclass up the class hierarchy to the root class. The first method found in this lookup process 
will be the one the receiver will run, supplying any arguments the message carries and returning any 
result to the caller. This effectively realizes inheritance.


The programmer only needs to know about the functionality (methods and attributes/fields) documented 
for the class/structure/type that was used to create the receiver. Because of inheritance all 
functionality (methods and attributes/fields) on the shortest path to the root of the class 
hierarchy is available as well, the reuse of tested functionality is therefore huge in such OOP systems.


However, the programmer does not need to know any of the gory implementation details at times that 
need to be tackled by the receiver, e.g. if communicating with Windows OLE objects or Java objects, 
one merely sends normal ooRexx messages to receivers that represent these Windows OLE objects or 
Java objects. Or with other words: the message paradigm makes it easy to treat Windows OLE objects 
or Java objects as if they were normal ooRexx objects as they conceptually understand ooRexx messages.


But in the end: the only thing new here is that invoking desired functionality is possible using a 
simple message paradigm with the simple pattern: receiver~message


Probably because of the simplicity of the messaga paradigm it got overlooked when others started to 
create OO programming languages, e.g. C++, Java, C#, Python and the like.


---rony

P.S.: The message paradigm makes a lot of dynamics possible in a simple, i.e. conceptually easy 
manner, including triggering multithreading or intercepting or rerouting messages.


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: REXX vs other languages WAS: Rexx numeric digits and scientific notation question

2024-04-17 Thread Rony G. Flatscher

On 17.04.2024 02:12, Andrew Rowley wrote:

On 16/04/2024 3:08 am, Jon Perryman wrote:
From a language standpoint, REXX is just another language but it's real strength is it's 
environment integration. Instead of the caller maintaining libraries, the environment 
automatically integrates with REXX. For instance, REXX in the TSO environment, gives you access 
to TSO commands (address TSO) and z/OS programs (address linkmvs). Start ISPF and address ISPEXEC 
is available. ISPF option 2 gives you address ISREDIT. SYSCALLS ON gives you address syscalls.


Rexx has better integration with z/OS, but Java has better integration with the 
rest of the world.

I just wrote a piece about sending SMS text messages from z/OS:

https://www.blackhillsoftware.com/news/2024/04/15/text-message-alerts-from-the-z-os-smf-real-time-interface/ 



Spoiler: it's 2 Java statements using the Twilio API.

Twilio.init(ACCOUNT_SID, AUTH_TOKEN); Message message = Message.creator( new 
com.twilio.type.PhoneNumber("+14159352345"), // to new 
com.twilio.type.PhoneNumber("+14158141829"), // from args[0]) .create();


Twilio provide a library that can be used to send text messages from z/OS. Amazon provide a 
library that can be used to work with AWS services from z/OS. It's very common for cloud providers 
to provide Java libraries for working with their services. Most of them will work on z/OS and open 
up those features to the mainframe.


Java is also a much more powerful language. I used to write a lot of Rexx, but I hate to go back 
because it is so much easier to get things done in Java.


Rexx is good for small tasks where the overhead of starting the JVM is significant, or where there 
isn't functionality in Java. Otherwise, Java is my choice.


As you know already Rexx it would be easy for you to learn about what ooRexx adds to Rexx. Take half 
an hour and read "Proposing ooRexx and BSF4ooRexx for Teaching Programming and Fundamental 
Programming Concepts" at 
.


Using the ooRexx-Java bridge BSF4ooRexx (which I have been authoring for over twenty years and 
available for all major operating systems like Windows, Linux, macOS, also a s390x version is 
available) you can easily write ooRexx programs that use any of the Java class libraries on any of 
the supported operating systems.


Notabene: you write one ooRexx program that will be runnable without any changes on Windows, Linux 
and macOS. This means you develop it e.g. on Windows at home and execute it in a Linux s390x 
subsystem at work and vice versa. ;)


To give you an idea I transcribed your interesting example given in Java using the depicted code 
supplied by your link above which looks like:


   /* Java version, 
cf.
   import com.twilio.Twilio;
   import com.twilio.rest.api.v2010.account.Message;
   import com.twilio.type.PhoneNumber;

   public class TwilioTest {
// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. Seehttp://twil.io/secure
public static final String ACCOUNT_SID = 
System.getenv("TWILIO_ACCOUNT_SID");
public static final String AUTH_TOKEN = 
System.getenv("TWILIO_AUTH_TOKEN");

public static void main(String[] args) {
Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
Message message = Message.creator(
new com.twilio.type.PhoneNumber("+14159352345"), // to
new com.twilio.type.PhoneNumber("+14158141829"), // from
args[0])
.create();

System.out.println(message.getSid());
}
   }

As practically all Java classes get documented as interlinked HTML files and usually are published 
on the Internet one can get at these JavaDocs using Internet search engines. One of the possible 
hits is e.g.: .


So anyone could take a look at how JavaDocs look like and use Internet search engines to get 
additional information.


Using the above Java program as an example here the (untested) ooRexx code:

   /* ooRexx version (using BSF4ooRexx) */
   parse arg argument  /* get argument */

   /* get values from process environment */
   account_sid=value("TWILIO_ACCOUNT_SID", ,"ENVIRONMENT")
   auth_token =value("TWILIO_AUTH_TOKEN" , ,"ENVIRONMENT")

   /* initalize Twilio environment */
   bsf.loadClass("com.twilio.Twilio")~init(account_sid, auth_token)

   /* create phone numbers */
   phoneTo  =.bsf~new("com.twilio.type.PhoneNumber", "+14159352345")
   phoneFrom=.bsf~new("com.twilio.type.PhoneNumber", "+14158141829")

   /* load Message class and use its static method creator) */
   clzMsg=bsf.importClass("com.twilio.rest.api.v2010.account.Message")

   /* create message */
   

Re: REXX vs other languages WAS: Rexx numeric digits and scientific notation question

2024-04-17 Thread Rony G. Flatscher

On 15.04.2024 19:08, Jon Perryman wrote:

Java's not perfect, but it is powerful and it is pretty much universally
available on z/OS.

People don't understand the ingenuity behind REXX and don't understand the real 
problems it solves. From a language standpoint, REXX is just another language 
but it's real strength is it's environment integration. Instead of the caller 
maintaining libraries, the environment automatically integrates with REXX. For 
instance, REXX in the TSO environment, gives you access to TSO commands 
(address TSO) and z/OS programs (address linkmvs). Start ISPF and address 
ISPEXEC is available. ISPF option 2 gives you address ISREDIT. SYSCALLS ON 
gives you address syscalls.

For product developers, REXX is simple to integrate environments as witnessed 
by the plethora of integrated environments on z/VM, z/OS and probably z/VSE 
(e.g. some addressable environments: automation, CICS, CMS, CP, TSO, UNIX, 
SYSCALLS and more)

OOREXX is not REXX because it does not have the automatic environment 
integration and as you say, using JAVA instead of OOREXX would be preferable. 
REXX on the other hand is preferable over JAVA in many IBM environments. For 
instance, why would you use JAVA as your system automation environment language?

The complication of using OOP REXX is rarely beneficial for most environments. 
Generally, you are not building complicated applications. For instance, system 
automation will be the most complex but managing events under objects would be 
complicated and unmanageable given the current automation environment design.


There is no "complication of using OOP REXX": ooRexx runs Rexx programs just like Rexx. It therefore 
needs to support addressable command environments it also supports the REXXSAA APIs including exits.


ooRexx adds the message expression to Rexx to simplify interactions with any kind of values. E.g. 
instead of coding


   say reverse("abc") /* yields a string "cba" */

you can optionally code:

   say "abc"~reverse  /* yields a string "cba" */

The message expression consists of a receiver value (synonyms: object, instance) on the left-hand 
side of the tilde (~), which is the message operator, followed by the name of a message on the right 
hand side. If the message has arguments you would supply them in parentheses.


The receiver is then responsible to search for a method (function) by the name of the received 
message, invokes it and returns the result, if any.


This is a quite simple concept.

Whether you take advantage of the message paradigm in ooRexx or not is up to you if working with 
strings as for strings there are the REXX built-in functions (BIFs).


In the context of message expressions please note that Alan Kaye, one of the most influential and 
seminal computer scientists who was working on Xerox PARC' SmallTalk gets cited Wikipedia 
(https://en.wikipedia.org/wiki/Alan_Kay):


   Along with some colleagues at PARC, Kay is one of the fathers of the idea of 
object-oriented
   programming  
(OOP), which he named.
   Some original object-oriented concepts, including the use of the words 
'object' and 'class', had
   been developed for Simula  67 at the 
Norwegian Computing
   Center . Kay said:

   I'm sorry that I long ago coined the term "objects" for this topic 
because it gets many
   people to focus on the lesser idea. The big idea is "messaging
   ".

The idea of messaging is what the IBM research team in Hursley added to REXX to come up with Object 
REXX, making it astonishingly simple to interact with any kind of value (object, instance) in any 
programming environment.


The message paradigm not only works with string values, but with any kind of values (objects, 
instances).


This is the reason why it is simple for novices who learn programming with ooRexx to interact with 
Windows and Windows programs like MS Office or OpenOffice or LibreOffice via OLE: the ooRexx 
programmer only needs to send messages to those Windows objects, how the receiver (an OLE object) 
carries them out is not necessary to be known by the ooRexx programmer.


The same is true for Java: the ooRexx programmer only needs to send messages to Java objects, how 
the receiver (a Java object) carries them out is not necessary to be known by the ooRexx programmer.


The same is true for DBus on Linux systems: the ooRexx programmer only needs to send messages to 
Java objects, how the receiver (a DBus object) carries them out is not necessary to be known by the 
ooRexx programmer.


And so on ...

---

The other addition of ooRexx to REXX are directive instructions. If present, they are put at the end 
of a program and direct the ooRexx interpreter to carry out services on behalf of the ooRexx 
programmer in the setup phase. E.g. the 

Hmm, 3 ... (Re: Rexx numeric digits and scientific notation question

2024-03-16 Thread Rony G. Flatscher
6 Mar 2024, at 2:47 am, Charles Mills  wrote:

Well, that explains a mystery. I did not realize that SIGNAL ON was

pushed and popped on subroutine calls. I have had this vague problem where
my SIGNAL ON NOVALUE did not seem to work but at the time of an error it is
always easier to fix the NOVALUE condition than troubleshoot the SIGNAL ON.

Thanks!
Charles

On Thu, 14 Mar 2024 12:04:00 -0500, Glenn Knickerbocker <

n...@bestweb.net> wrote:

On Wed, 13 Mar 2024 11:01:30 -0500, Charles Mills

wrote:

And the answer is ... "The three numeric settings are automatically

saved across internal and external subroutine and function calls."

I was setting numeric digits in an initialization subroutine, so Rexx

helpfully unset it on return from initialization. I thought I had done it
that way before but I guess I have not.

Funny, I work with a lot of code that has a common subroutine for

retrieving a TRACE setting to set in the main routine, and I never even
thought about why, or about all the stuff that gets saved across calls!
 From CALL HELPREXX on VM:

The status of DO loops and other structures:

--though, importantly, not the *indices* of the loops!

Trace action:
NUMERIC settings:
ADDRESS settings:
Condition traps: (CALL ON and SIGNAL ON)
Condition information:
Elapsed-time clocks:
OPTIONS settings:

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email tolists...@listserv.ua.edu  with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email tolists...@listserv.ua.edu  with the message: INFO IBM-MAIN


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email tolists...@listserv.ua.edu  with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email tolists...@listserv.ua.edu  with the message: INFO IBM-MAIN



--
Jay Maynard

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email tolists...@listserv.ua.edu  with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email tolists...@listserv.ua.edu  with the message: INFO IBM-MAIN


--
--
__________

Prof. Dr. Rony G. Flatscher
Department Wirtschaftsinformatik und Operations Management
Institut für Wirtschaftsinformatik und Gesellschaft
D2c 2.086
WU Wien
Welthandelsplatz 1
A-1020  Wien/Vienna, Austria/Europe

http://www.wu.ac.at
__





--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Hmm, 2 ... (Re: Rexx numeric digits and scientific notation question

2024-03-16 Thread Rony G. Flatscher
ork with, and it is not difficult 
to adapt to its quirks:

<http://www.rexxla.org/Newsletter/9812safe.html>
<http://www.rexxla.org/Newsletter/9901safe.html>

--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3
עַם יִשְׂרָאֵל חַי
נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר


From: IBM Mainframe Discussion List  on behalf of David 
Crayford<0595a051454b-dmarc-requ...@listserv.ua.edu>
Sent: Friday, March 15, 2024 6:40 PM
To:IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Rexx numeric digits and scientific notation question

REXX can indeed be quite tricky to navigate. I recently conducted a session titled 
"Python for REXX programmers" at work, and during the preparation, I was 
surprised (although not entirely) by the numerous traps and pitfalls inherent in REXX. 
When you add to this its absence of basic functionalities like sorting lists, it begs the 
question: Why opt for REXX when we have a plethora of alternatives available today?

The obvious answer may be familiarity, but in our industry, this argument seems 
rather weak unless you're confined to a limited environment. After all, I 
wouldn't want to revert to using a 1990s-era flip-top phone, let alone a rotary 
dial from the 1970s.


On 16 Mar 2024, at 2:47 am, Charles Mills  wrote:

Well, that explains a mystery. I did not realize that SIGNAL ON was pushed and 
popped on subroutine calls. I have had this vague problem where my SIGNAL ON 
NOVALUE did not seem to work but at the time of an error it is always easier to 
fix the NOVALUE condition than troubleshoot the SIGNAL ON.

Thanks!
Charles

On Thu, 14 Mar 2024 12:04:00 -0500, Glenn Knickerbocker  
wrote:


On Wed, 13 Mar 2024 11:01:30 -0500, Charles Mills  wrote:

And the answer is ... "The three numeric settings are automatically saved across 
internal and external subroutine and function calls."
I was setting numeric digits in an initialization subroutine, so Rexx helpfully 
unset it on return from initialization. I thought I had done it that way before 
but I guess I have not.

Funny, I work with a lot of code that has a common subroutine for retrieving a 
TRACE setting to set in the main routine, and I never even thought about why, 
or about all the stuff that gets saved across calls!  From CALL HELPREXX on VM:


The status of DO loops and other structures:

--though, importantly, not the *indices* of the loops!

Trace action:
NUMERIC settings:
ADDRESS settings:
Condition traps: (CALL ON and SIGNAL ON)
Condition information:
Elapsed-time clocks:
OPTIONS settings:

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email tolists...@listserv.ua.edu  with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email tolists...@listserv.ua.edu  with the message: INFO IBM-MAIN


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email tolists...@listserv.ua.edu  with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email tolists...@listserv.ua.edu  with the message: INFO IBM-MAIN


--
--
__

Prof. Dr. Rony G. Flatscher
Department Wirtschaftsinformatik und Operations Management
Institut für Wirtschaftsinformatik und Gesellschaft
D2c 2.086
WU Wien
Welthandelsplatz 1
A-1020  Wien/Vienna, Austria/Europe

http://www.wu.ac.at
__





--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Hmm, 1 ... (Re: Rexx numeric digits and scientific notation question

2024-03-16 Thread Rony G. Flatscher

On 15.03.2024 23:40, David Crayford wrote:

REXX can indeed be quite tricky to navigate. I recently conducted a session titled 
"Python for REXX programmers" at work, and during the preparation, I was 
surprised (although not entirely) by the numerous traps and pitfalls inherent in REXX.
There are no "numerous pitfalls inherent in REXX", it therefore is a form of badmouthing that I 
would expect from a religious language warrior, not from a sorber software engineer.

When you add to this its absence of basic functionalities like sorting lists, 
it begs the question: Why opt for REXX when we have a plethora of alternatives 
available today?


The first has nothing to do with the second. Anyone who needs sorting capabitites of lists can do so 
in Rexx.


For a professional software engineer it is mandatory that he knows more than one programming 
language if he wishes to be able to solve problems adequately.



The obvious answer may be familiarity, but in our industry, this argument seems 
rather weak unless you're confined to a limited environment. After all, I 
wouldn't want to revert to using a 1990s-era flip-top phone, let alone a rotary 
dial from the 1970s.


The obvious answer would rather be that there is a plethora of Rexx that has been developed over the 
decades that reliably and efficiently solves problems. From a business administration point of view 
it would be quite stupid to forgo well tested and working software.


---rony



On 16 Mar 2024, at 2:47 am, Charles Mills  wrote:

Well, that explains a mystery. I did not realize that SIGNAL ON was pushed and 
popped on subroutine calls. I have had this vague problem where my SIGNAL ON 
NOVALUE did not seem to work but at the time of an error it is always easier to 
fix the NOVALUE condition than troubleshoot the SIGNAL ON.

Thanks!
Charles

On Thu, 14 Mar 2024 12:04:00 -0500, Glenn Knickerbocker  
wrote:


On Wed, 13 Mar 2024 11:01:30 -0500, Charles Mills  wrote:

And the answer is ... "The three numeric settings are automatically saved across 
internal and external subroutine and function calls."
I was setting numeric digits in an initialization subroutine, so Rexx helpfully 
unset it on return from initialization. I thought I had done it that way before 
but I guess I have not.

Funny, I work with a lot of code that has a common subroutine for retrieving a 
TRACE setting to set in the main routine, and I never even thought about why, 
or about all the stuff that gets saved across calls!  From CALL HELPREXX on VM:


The status of DO loops and other structures:

--though, importantly, not the *indices* of the loops!

Trace action:
NUMERIC settings:
ADDRESS settings:
Condition traps: (CALL ON and SIGNAL ON)
Condition information:
Elapsed-time clocks:


--
--
______

Prof. Dr. Rony G. Flatscher
Department Wirtschaftsinformatik und Operations Management
Institut für Wirtschaftsinformatik und Gesellschaft
D2c 2.086
WU Wien
Welthandelsplatz 1
A-1020  Wien/Vienna, Austria/Europe

http://www.wu.ac.at
__

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


CFP for this year's International Rexx Symposium (Australia in March), mainframe Rexx talks welcome

2024-01-09 Thread Rony G. Flatscher

Hi there,

the Rexx Language Association (https://www.RexxLA.org) has announced the 35^th International Rexx 
Language Symposium to take place in Brisbane (Greenbank), Qld, *Australia* and online between March 
3 and March 6, 2024, which is an opportunity to meet with Rexx developers in person in Australia 
this year.


As the Rexx community encompasses the mainframe world, presentations for mainframe Rexx are welcome, 
so this would be an opportunity to share your mainframe Rexx expertise with others. Here the call 
for presentations: <https://www.rexxla.org/document.rsp?base=events=2024=cfp>, please 
consider to offer a presentation. (Should you employ the s390x version of ooRexx then it would be 
interesting to learn about it and lessons learned as well!)


So, maybe in Australia in person or digitally!

---rony

P.S.: RexxLA is a non-profit organization based in the U.S. that owns the source code of quite a few 
Rexx-related software including interpreters (e.g. the source code of ooRexx which can be traced 
back to IBM's source code of its Object REXX product which IBM handed over to RexxLA for further 
development and for distribution as open-source and became ooRexx). RexxLA's membership consists of 
Rexx users and developers on practically all operating systems at all experience levels. As the 
RexxLA-membership has become free it may be interesting for Rexxers in this list to join with 
others, some of which have a mainframe background. Among other things you will be in a community 
with Mike F. Cowlishaw (the father of Rexx and NetRexx), Mark Hessling (Regina, an open-source Rexx 
interpreter, available also for Hercules), Rick McGuire (ooRexx, I think, he is the only person that 
has implemented a Rexx interpreter for every IBM operating system) and many more. Homepage: 
<https://www.rexxla.org>,  join page: <https://www.rexxla.org/members/index.rsp?action=join> (you 
can only join if you are able to answer a Rexx related question ;) - to fight robots).


P.P.S.: Today a new beta of BSF4ooRexx850 (a bi-directional ooRexx-Java bridge, camouflaging Java as 
ooRexx) got announced which is planned to be released at the symposium if no showstopper bugs 
appear. The installation zip archive for BSF4ooRexx850 supports s390x (but also all versions of 
Linux, Windows and macOS) out of the box such that if you have the s390x version of ooRexx you can 
use that immediately to exploit everything that Java has available (without a need to learn Java at 
all). You therefore become immediately able to exploit even mainframe specific Java class libraries, 
as well as any other third party Java class library there is!


In case you are curious and want to check out what that powerful combination allows for here two 
URLs: ooRexx <https://sourceforge.net/projects/oorexx/files/oorexx/5.0.0/> (look for "s390x" in the 
ooRexx download link name) and BSF4ooRexx850 
<https://sourceforge.net/projects/bsf4oorexx/files/beta/20240109/>. After installation look-up 
BSF4ooRexx850/samples/index.html for a brief explanation of the numerous samples demonstrating what 
becomes possible with this powerful combination. Both technologies are open-source and tested (e.g. 
there is currently no known error for BSF4ooRexx850).


It is likely that a presentation on the new BSF4ooRexx850 will be given at the International Rexx 
Language Symposium in Australia with Q (like "850" in the package name denotes the minimum level 
of Java 8 (850%100) and ooRexx 5 (850//100/10)).



--
______

Prof. Dr. Rony G. Flatscher
Department Wirtschaftsinformatik und Operations Management
Institut für Wirtschaftsinformatik und Gesellschaft
D2c 2.086
WU Wien
Welthandelsplatz 1
A-1020  Wien/Vienna, Austria/Europe

http://www.wu.ac.at
__



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: External Functions in C on z/OS

2023-11-22 Thread Rony G. Flatscher
hod toString  */

   ::requires BSF.CLS /* ooRexx package (ooRexx-Java bridge)   */

Here the output:

   java.awt.Dimension[width=100,height=200]

As you can see, truly a Java object is being used from ooRexx, without a need to know any of the 
Java syntax, just the documentation of those Java classes. In the case of java.awt.Dimension cf. 
e.g. <https://docs.oracle.com/javase/8/docs/api/java/awt/Dimension.html>.


The above oRexx program could also be executed via the Java scripting framework as demonstrated 
above without a need to change anything in the code.


---rony









On 11/17/23 10:00, Rony G. Flatscher wrote:

On 16.11.2023 22:54, David Crayford wrote:

I don't find ooRexx useful on the PC as it's basically on life support
where Python has millions of contributors. Take data validation as an
example. There is a first class library https://docs.pydantic.dev/latest/.

Python isn't my favorite language by a large margin. But it is useful so it
wins. Same same with Java. Personal preference is secondary to a pragmatic
choice.


The combination of ooRexx [1] with Java [2] - on all platforms - allows one to exploit all of 
Java (the Java runtime environment) as a huge external class library for ooRexx. Unlike with 
Python there would be no need to locate, choose and import specific modules with the needed 
functionality, rather one can use the Rexx skills to immediately exploit all of the Java 
functionality on all platforms.


It is hard to realize/assess the potential of this combination without a little bit of curiosity 
and the will to learn new tricks.


---rony

[1] ooRexx download site: 
<https://sourceforge.net/projects/oorexx/files/oorexx/>
[2] ooRexx-Java bridge (BSF4ooRexx850) download site: 
<https://sourceforge.net/projects/bsf4oorexx/files/beta/20221004/>




On Fri, Nov 17, 2023 at 5:32 AM Seymour J Metz  wrote:


I find REXX extremely useful on PCs, but TSO/E REXX is a backwater
compared to ooRexx, and I would be tempted to use Java or Python for
complicated TSO scripts. But on z/Linux ooRexx with BSF4REXX is a viable
option.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3
עַם יִשְׂרָאֵל חַי




From: IBM Mainframe Discussion List  on behalf
of David Crayford 
Sent: Thursday, November 16, 2023 4:02 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: External Functions in C on z/OS

I choose a language on capabilities rather than personal preference. I’ve
been accused on this forum by my ex-colleague and pal Wayne Bickerdyke of
having a pathological dislike of REXX. That’s not true, but I do find it
less useful than other languages. Python has a useful library called ctypes
which includes classes for mapping data structures with Python classes. We
use BigEndianStructure for mapping control blocks
https://docs.python.org/3/library/ctypes.html#ctypes.BigEndianStructure.
It would be cool if the tooling that we worked on with Peter Relson to
create C header files could be reused to generate Python mappings. With the
recent zIIP offloading Python is strategic.


On 17 Nov 2023, at 12:38 am, Charles Mills  wrote:

  Different strokes for different folks.

1. I was not aware of that pointer. This is the classic documentation

problem. The answer is right there in the manual, clear as day -- provided
you know where to look. A lot of these answers are easy to find, assuming
you already know the answer.

2. My code is running a complex Rexx environment that frankly I do not

fully understand. (I didn't write it and it isn't "mine.") I wanted to be
sure I had THE right environment block, not SOME environment block. An
11-instruction assembler module seemed like a great solution. I still
believe that it was.

  Charles

On Thu, 16 Nov 2023 11:31:20 +0800, David Crayford 

wrote:

There's a TSO/E vector table that has the address of the REXX routines.

// get the address of the TSO/e vector table
CVT  * cvt  = *(( CVT ** ) CVTPTR);
TSVT * tsvt = cvt->cvttvt;


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


--
--
__

Prof. Dr. Rony G. Flatscher
Department Wirtschaftsinformatik und Operations Management
Institut für Wirtschaftsinformatik und Gesellschaft
D2c 2.086
WU Wien
Welthandelsplatz 1
A-1020  Wien/Vienna, Austria/Europe

http://www.wu.ac.at
__





--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: External Functions in C on z/OS

2023-11-17 Thread Rony G. Flatscher

On 16.11.2023 22:54, David Crayford wrote:

I don't find ooRexx useful on the PC as it's basically on life support
where Python has millions of contributors. Take data validation as an
example. There is a first class library https://docs.pydantic.dev/latest/.

Python isn't my favorite language by a large margin. But it is useful so it
wins. Same same with Java. Personal preference is secondary to a pragmatic
choice.


The combination of ooRexx [1] with Java [2] - on all platforms - allows one to exploit all of Java 
(the Java runtime environment) as a huge external class library for ooRexx. Unlike with Python there 
would be no need to locate, choose and import specific modules with the needed functionality, rather 
one can use the Rexx skills to immediately exploit all of the Java functionality on all platforms.


It is hard to realize/assess the potential of this combination without a little bit of curiosity and 
the will to learn new tricks.


---rony

[1] ooRexx download site: 

[2] ooRexx-Java bridge (BSF4ooRexx850) download site: 





On Fri, Nov 17, 2023 at 5:32 AM Seymour J Metz  wrote:


I find REXX extremely useful on PCs, but TSO/E REXX is a backwater
compared to ooRexx, and I would be tempted to use Java or Python for
complicated TSO scripts. But on z/Linux ooRexx with BSF4REXX is a viable
option.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3
עַם יִשְׂרָאֵל חַי




From: IBM Mainframe Discussion List  on behalf
of David Crayford 
Sent: Thursday, November 16, 2023 4:02 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: External Functions in C on z/OS

I choose a language on capabilities rather than personal preference. I’ve
been accused on this forum by my ex-colleague and pal Wayne Bickerdyke of
having a pathological dislike of REXX. That’s not true, but I do find it
less useful than other languages. Python has a useful library called ctypes
which includes classes for mapping data structures with Python classes. We
use BigEndianStructure for mapping control blocks
https://docs.python.org/3/library/ctypes.html#ctypes.BigEndianStructure.
It would be cool if the tooling that we worked on with Peter Relson to
create C header files could be reused to generate Python mappings. With the
recent zIIP offloading Python is strategic.


On 17 Nov 2023, at 12:38 am, Charles Mills  wrote:

  Different strokes for different folks.

1. I was not aware of that pointer. This is the classic documentation

problem. The answer is right there in the manual, clear as day -- provided
you know where to look. A lot of these answers are easy to find, assuming
you already know the answer.

2. My code is running a complex Rexx environment that frankly I do not

fully understand. (I didn't write it and it isn't "mine.") I wanted to be
sure I had THE right environment block, not SOME environment block. An
11-instruction assembler module seemed like a great solution. I still
believe that it was.

  Charles

On Thu, 16 Nov 2023 11:31:20 +0800, David Crayford 

wrote:

There's a TSO/E vector table that has the address of the REXX routines.

// get the address of the TSO/e vector table
CVT  * cvt  = *(( CVT ** ) CVTPTR);
TSVT * tsvt = cvt->cvttvt;


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: External Functions in C on z/OS

2023-11-16 Thread Rony G. Flatscher

On 16.11.2023 02:24, Eric Erickson wrote:

First of all thanks to Colin for sending me the headers. Before I went down the 
path of generating them myself, I want to see what other had experienced trying 
to do this.

I can't use Metal C, as the routines I want to call out of the functions are 
not supported under Metal C.

FWIW, I was looking at creating a Rexx Function to retrieve a record from a 
EZNOSQL Database and return it in the Rexx Variable for use. IBM has C/Java 
APIs for EZNOSQL, but not Rexx at this time. There is an idea logged to create 
it, but its marked as future consideration, so no telling when (or if) it will 
appear.


It is interesting to learn this problem (C/C++ being slow for creating external Rexx functions in 
C/C++ due to LE). It seems that the C/Java combination does not have that problem? If so, then one 
possibility would be to have a port of ooRexx and BSF4ooRexx850 (Rexx-Java-bridge) which makes all 
of Java available but in the clothes of Rexx to exploit Java directly! Creating external Rexx 
function and ooRexx method packages is easy and straight forward.


For Linux on IBM Z mainframes there have been mainframe users who use ooRexx and BSF4ooRexx850 for 
interfacing with DB2 from their Rexx programs. ooRexx is open source and straight forward to compile 
for Linux on IBM Z, the same for BSF4ooRexx850.


Actually there is a s390x port of  ooRexx from 
, and BSF4ooRexx850 from 
 includes a s390x port in its 
installation zip-archive for that very purpose! This allows to immediately use ooRexx on mainframes 
and with the ooRexx-Java bridge to allow to use all of Java as it was ooRexx, *quite* easy and 
powerful!


A Rexx programmer can exploit all of what is available on Linux on IBM Z mainframes. One can 
interact with any Java class/object to use anything Java makes available (and having even callbacks 
from Java to Rexx out of the box)! So, anything IBM and others make available via Java can be used 
from Rexx.


So if Linux on IBM Z is an option you could immediately check out that powerful combination and 
leverage your Rexx skills to exploit all Java classes without a need to learn the Java programming 
language.


Also, you could use this infrastructure on your Windows, macOS and Linux machines as Java makes the 
developed solutions portable! With other wordks, you can develop Rexx apps exploiting Java e.g. on 
Windows, then run the Rexx app on Windows, but also run it unchanged on macOS or Linux, even on 
Linux on IBM Z mainframes!


---rony

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


IntelliJ Rexx plugin (Re: JAVA IDE

2023-08-24 Thread Rony G. Flatscher
IntelliJ users may gain Rexx syntax highlighting and syntax checking if installing the ooRexxPlugin 
for IntelliJ which a former student created and has been maintaining since. It covers Rexx, ooRexx 
5.0 and Executor. He was kind enough to add support for the mainframe Rexx programs characters that 
got removed for TRL2.


Here a presentation from this year's International Rexx symposium about IntelliJ with the ooRexx 
plugin and its included Rexx documentation support that can be exploited for any Rexx program: 
. It also demonstrates its 
auot-completion feature which can be supplemented with one own's names.


Here the plugin location with the readme for installation: 
.


---rony


On 23.08.2023 21:33, David Crayford wrote:

100% agree with Kirk. IntelliJ IDEA is head and shoulders the best Java IDE. 
I’ve mostly been coding in Java for the last few years and use the Ultimate 
edition which is quite expensive but worth every penny. We also use the 
Jetbrains CLion IDE for C/C++ and Python. I’ve recently been playing with VS 
Code for doing some Python presentations and it’s an excellent editor.


On 24 Aug 2023, at 1:11 am, Kirk Wolf  wrote:

BTW:  ibm-main is probably the worst place to ask :-)

Kirk Wolf
Dovetailed Technologies

To answer you question, for a real Java IDE, Java programmers generally believe 
that IntelliJ is the best and that's hard to argue with.I've used Eclipse 
for a really long time. If you are doing z/OS Java development, it's 
generally best to develop on your workstation and just deploy compiled jars to 
z/OS.   We use some enhanced Ant SSH/SFTP tasks that we developed to target 
z/OS from the IDE (for C/C++, assembler, and Java).
https://coztoolkit.com/community/antssh.html


On Wed, Aug 23, 2023, at 11:35 AM, Seymour J Metz wrote:

The question "What is the best foo?" is guarantied to start a religious war, 
whether foo be an editor, an IDE, a language, an OS or a shell. Try a few and see what 
you like.


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


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Steve Beaver [050e0c375a14-dmarc-requ...@listserv.ua.edu]
Sent: Wednesday, August 23, 2023 11:07 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: JAVA IDE

I can believe that I'm asking this question.





What is the best/most friendly JAVA IDE?





Steve



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


EHLLAPI and connInfo (Re: OLE and ooRexx (Re: Using EHLLAPI from ooRexx

2023-07-01 Thread Rony G. Flatscher

On 01.07.2023 14:17, Rony G. Flatscher wrote:
Sorry, my bad.  "autECLConnList" is probably an array so you may want to try either "str = 
autoECLConnList[1]~name" or "str = autoECLConnLista~t(1)~name" instead.


Ah, just saw in the ooRexx support list that Erich was able to introspect it (so he probably has 
EHLLAPI installed on his machine). This is what he writes:



str = connList(1)~Name


   connList(1) is not a method invocation, but a simple function call - but we
   have no function called "connList".
From the docs you'd think that connList[1] should work, but it doesn't (not
   sure why the docs show it like this).
   To figure out what is actually implemented, use the samples\ole\methinfo
   sample with input "PCOMM.autECLConnList"
   Among others, it will list
   VT_DISPATCH ConnInfo([in] VT_VARIANT Index)
   Given a numeric index, returns one of the items in the collection.

   So this code works:

   ~~~
   do c = 1 to connList~count
   conn = connList~connInfo(c)
   say conn~name conn~connType conn~codepage conn~started conn~ready
   end
   ~~~

so to translate this to the variables names the IBM docs and the ooRexx 
transcription uses:

   ~~~
   autoECLConnList = .OleObject~new("PCOMM.autECLConnList")
   autoECLConnList~Refresh
   str = autECLConnList~connInfo(1)~Name

   ~~~

("connInfo" is probably a default property such that VBA would refer to it.)

Also an interesting link (just found it searching for "connInfo" in addition) in this context may 
be: 
<https://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/OLE~COM~ADO~CDO~ADSI~LDAP/Samples~from~Users+IBM~Personal~Communications~Connect~Via~COM.txt>. 



(If transcribing VBA code to ooRexx usually replacing the dot (.) in statements with a tilde (~) 
would be enough already to make it run under ooRexx.)


---rony



( VBA/OLE arrays may use indexes from 0 up to size-1, but could also - and sometimes do - 
arbitrarily define the lower bound index and the upper bound index).


---

If you want to use the OLE interface from ooRexx then the documentation "Windows Extensions 
Reference" in "winextensions.pdf" in "Chapter 8. OLE Automation" will be helpful.


---

Also the tools of "OLEInfo" may be helpful (even for other languages than 
ooRexx using OLE) :

 * listProgIds.rex ... lists all OLE/COM ProgIds, one can optionally filter the 
(overwhelming)
   output to contain supplied string chunks (it is always interesting to see 
what your Windows
   machine has installed)

 * createOleInfo.rex ... queries and documents the published attributes, 
methods/functions,
   constants and events of OLE Windows programs in a verbose (includes 
published constants) or in a
   terse form (the latter is meant to serve as a sort of reference that one can 
put next to the
   keyboard); the generated documentation is HTML with a CSS for formatting and 
includes the
   arguments, their published names and types

 * getOleConstants.rex ... creates an ooRexx package (program) that makes all 
published constants
   available to Rexx programs via the environment symbol ".ole.const"

E.g., if you ever wanted to see all published Excel methods, events, attributes in a terse 
(reference) form then you could issue:


   createOleInfo.rex Excel.Application 1

and maybe in your case you could try e.g.:

   createOleInfo.rex PCOMM.autECLConnList


You can get OLEInfo from my sandbox at 
<https://sourceforge.net/p/oorexx/code-0/HEAD/tree/sandbox/rony/oleinfo/> where the readme.txt 
file gets displayed such that you can study at a little bit more detail. To download it you could 
press the button at the right hand corner of the line named "Tree [r12695]/..." labeled "Download 
Snapshot" which creates a zip-archive of that part of the source code tree that then can be 
downloaded.


HTH,

---rony


On 30.06.2023 17:13, Farley, Peter wrote:

No luck I am afraid:

  5 *-* str = autECLConnList(1)~Name
Error 43 running C:\Users\myname\Documents\testdir\testhacl.rex line 5:  
Routine not found.
Error 43.1:  Could not find routine "AUTECLCONNLIST".

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Rony G. Flatscher
Sent: Friday, June 30, 2023 3:46 AM
To:IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Using EHLLAPI from ooRexx

Just noted that the mailer ruined the syntax:

         autoECLConnList = .OleObject~new("PCOMM.autECLConnList")
     autoECLConnList~Refresh
     str = autECLConnList(1)~Name

---rony


On 30.06.2023 09:22, Rony G. Flatscher wrote:

On 30.06.2023 08:46, Farley, Peter wrote:

Thanks for the link David, but that seems to be tied intimately to
x3270, and I need it to work with PCOMM.

Also investigating PCOMM HACL (Host Access Class Library) as an
alternative, using VBScript (<*Sigh*>, yet another lan

OLE and ooRexx (Re: Using EHLLAPI from ooRexx

2023-07-01 Thread Rony G. Flatscher
Sorry, my bad.  "autECLConnList" is probably an array so you may want to try either "str = 
autoECLConnList[1]~name" or "str = autoECLConnLista~t(1)~name" instead.


( VBA/OLE arrays may use indexes from 0 up to size-1, but could also - and sometimes do - 
arbitrarily define the lower bound index and the upper bound index).


---

If you want to use the OLE interface from ooRexx then the documentation "Windows Extensions 
Reference" in "winextensions.pdf" in "Chapter 8. OLE Automation" will be helpful.


---

Also the tools of "OLEInfo" may be helpful (even for other languages than 
ooRexx using OLE) :

 * listProgIds.rex ... lists all OLE/COM ProgIds, one can optionally filter the 
(overwhelming)
   output to contain supplied string chunks (it is always interesting to see 
what your Windows
   machine has installed)

 * createOleInfo.rex ... queries and documents the published attributes, 
methods/functions,
   constants and events of OLE Windows programs in a verbose (includes 
published constants) or in a
   terse form (the latter is meant to serve as a sort of reference that one can 
put next to the
   keyboard); the generated documentation is HTML with a CSS for formatting and 
includes the
   arguments, their published names and types

 * getOleConstants.rex ... creates an ooRexx package (program) that makes all 
published constants
   available to Rexx programs via the environment symbol ".ole.const"

E.g., if you ever wanted to see all published Excel methods, events, attributes in a terse 
(reference) form then you could issue:


   createOleInfo.rex Excel.Application 1

and maybe in your case you could try e.g.:

   createOleInfo.rex PCOMM.autECLConnList


You can get OLEInfo from my sandbox at 
<https://sourceforge.net/p/oorexx/code-0/HEAD/tree/sandbox/rony/oleinfo/> where the readme.txt file 
gets displayed such that you can study at a little bit more detail. To download it you could press 
the button at the right hand corner of the line named "Tree [r12695]/..." labeled "Download 
Snapshot" which creates a zip-archive of that part of the source code tree that then can be downloaded.


HTH,

---rony


On 30.06.2023 17:13, Farley, Peter wrote:

No luck I am afraid:

  5 *-* str = autECLConnList(1)~Name
Error 43 running C:\Users\myname\Documents\testdir\testhacl.rex line 5:  
Routine not found.
Error 43.1:  Could not find routine "AUTECLCONNLIST".

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Rony G. Flatscher
Sent: Friday, June 30, 2023 3:46 AM
To:IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Using EHLLAPI from ooRexx

Just noted that the mailer ruined the syntax:

     autoECLConnList = .OleObject~new("PCOMM.autECLConnList")
     autoECLConnList~Refresh
     str = autECLConnList(1)~Name

---rony


On 30.06.2023 09:22, Rony G. Flatscher wrote:

On 30.06.2023 08:46, Farley, Peter wrote:

Thanks for the link David, but that seems to be tied intimately to
x3270, and I need it to work with PCOMM.

Also investigating PCOMM HACL (Host Access Class Library) as an
alternative, using VBScript (<*Sigh*>, yet another language to learn).

Judging from
<https://urldefense.com/v3/__https://www.ibm.com/docs/en/personal-comm 
unications/15.0?topic=SSEQ5Y_15.0.0*com.ibm.pcomm.doc*books*html*host_access08.html__;Ly8vLw!!Ebr-cpPeAnfNniQ8HSAI-g_K5b7VKg!OHS9_k-XSvFBFZyLGLsofx1K3_bpc7Pb70Zhae2AclS3_irQqT4UewjjkGikadAo6rgTf_y3zKD0tgb45uP95EcVnD0QEVU4$ 
>  there are OLE APIs which should allow you to use the Windows version of ooRexx as it supports OLE.

That is the reason why you can code in ooRexx for MS Excel, MS Word,
MS Powerpoint and the like, just look up the ooRexx samples in
"ooRexx\samples\ole\apps" where you would see also samples for 
OpenOffice/LibreOffice via OLE.

So looking at the VBA example:

    |Dim Str as String Dim autECLConnList as Object Dim Num as Long Set
autECLConnList =
    CreateObject("PCOMM.autECLConnList") autECLConnList.Refresh Str =
autECLConnList(1).Name|

try the following in ooRexx:

    autoECLConnList = .OleObject~new(|PCOMM.autECLConnList")|
    autoECLConnList~Refresh
    str = autECLConnList(1)~Name

Does that work for you?

---rony


-Original Message-
From: IBM Mainframe Discussion List   On
Behalf Of David Crayford
Sent: Thursday, June 29, 2023 11:48 PMTo:IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Using EHLLAPI from ooRexx

It may be easier to
usehttps://urldefense.com/v3/__https://github.com/py3270/py3270__;!!E
br-cpPeAnfNniQ8HSAI-g_K5b7VKg!LslIz3RHy9Ct1CC2dStYVdn9sNVor2JieWkv62q
KTHeNjTV8BP_GG59tue0S-FF-h_YqPRXXtxsO4U4NUCOrg08$


On 29 Jun 2023, at 10:56 pm, Farley, 
Peter<031df298a9da-dmarc-requ...@listserv.ua.edu>  wrote:

Hi All,

I have sent this question to the ooRexx help list but have not yet
seen an answer.  Hoping someone here has been down this pa

Re: COBOL and the Java scripting framework ? (Re: Are there samples of COBOL methods or classes?

2023-06-30 Thread Rony G. Flatscher

On 30.06.2023 09:44, Rony G. Flatscher wrote:

On 28.06.2023 17:26, Tom Ross wrote:

Please check out the examples in the COBOL Programming Guide, in
Part 6. Developing object-oriented programs

GO here:https://www.ibm.com/support/pages/node/611415
Select which release you are interested in and then
click "Product Documentation"


thank you, Tom. Could get to <https://www.ibm.com/support/pages/node/611415#64> and from there to 
the programming guide at <https://publibfp.dhe.ibm.com/epubs/pdf/igy6pg40.pdf>.


It seems that OO COBOL allows interacting with Java via JNI (Java native interface) only. 6.4 adds 
the ability to invoke static Java methods without OO COBOL.


Not having any of the necessary infrastructure (mainframe ;) , OO COBOL and Java) there is nothing 
I could do. So maybe just hinting of what would become possible if anyone with the OO COBOL-Java 
skills would come with showing how to code the following Java program in OO COBOL.


Such an example would serve as a nutshell example that would demonstrate how to invoke scripts 
from OO COBOL in any scripting language for which an implementation of javax.script.Engine exists 
including supplying arguments (stored in a Java array of type java.lang.Object) and fetching the 
result.


To make this as flexible (and thereby as usable) as possible, the following Java program will take 
the name of a file containing a script as a single argument, and then will load with the help of 
the Java scripting framework the appropriate scripting engine to execute the script, and supply as 
an argument the name of a Java system property which the script should return to the caller.


Here the Java code that should be transcribed to COBOL:

   import javax.script.*;
   import java.io.File;
   import java.io.FileReader;

   class Test
   {
    public static void main (String args[])
    {
    if (args.length==0)
    {
    System.err.println("file name missing...");
    System.exit(-1);
    }
    String fileName = args[0];    // get filename
    String extension    = 
fileName.substring(fileName.lastIndexOf(".")+1);
    ScriptEngineManager sem = new ScriptEngineManager();
    ScriptEngine    se  = sem.getEngineByExtension(extension);

    Object result = null;
    try
    {
    ScriptContext sc    = se.getContext();
    // add filename
    sc.setAttribute(se.FILENAME, fileName  , sc.ENGINE_SCOPE);
    // add some arbitrary arguments
    Object scriptArgs[] = new Object [] { "first", "", "trois", null, 
"cinque" };
    sc.setAttribute(se.ARGV    , scriptArgs, sc.ENGINE_SCOPE);
    // create a FileReader from File
    FileReader f    = new FileReader(new File(fileName));
    result=se.eval(f);  // read and execute script
    }
    catch (Throwable t)
    {
    System.err.println("Oops, some exception occurred: "+t);
    }
    System.out.println("script's result: "+result);
    System.exit(0);
    }
   }

Here a Rexx file (can be any Rexx script):

   parse source s
   say "source :" s
   parse version v
   say "version:" v
   say "there are" arg() "arguments supplied:"
   do i=1 to arg()
   say "   #" i":" arg(i)
   end
   return 43

The Java program "Test", once compiled can then be used to run any script (not only Rexx) from a 
script file where the file extension determines which scripting language should get loaded to run 
the script in the file. Here an example of running the Java program supplying the name of a file 
containing a Rexx script:


   G:\tmp\bsf4oorexx\cobol>java Test rexxscript.rex
   REXXout>source : WindowsNT SUBROUTINE rexxscript_ori.rex
   REXXout>version: REXX-ooRexx_5.1.0(MT)_64-bit 6.05 6 Jun 2023
   REXXout>there are 6 arguments supplied:
   REXXout>   # 1: first
   REXXout>   # 2:
   REXXout>   # 3: trois
   REXXout>   # 4: The NIL object
   REXXout>   # 5: cinque
   REXXout>   # 6: a Slot.Argument
   script's result: 43

---

The script code can also be supplied directly as a String to the script engine's eval() method 
"res=eval(String scriptCode)", such that you could load the script code from a database in case 
you have it stored as such. The possibilities are endless.


As you can see, one can submit any value/object as an argument to the script and fetch any result 
of the script.


---

It would be interesting to see the above Java code transcribed to COBOL, so anyone with the 
necessary skills please give a helping hand for the community! :)


The result would be enabling COBOL programmers to in

Re: Using EHLLAPI from ooRexx

2023-06-30 Thread Rony G. Flatscher

According to Erich from this morning:

    Forwarded Message 

   Subject: [oorexx:discussion] Re: How to use ooRexx to call EHLLAPI of 
IBM Personal Communications
   Date:Fri, 30 Jun 2023 07:42:43 -
   From:Erich 
   Reply-To:[oorexx:discussion] 
<408...@discussion.oorexx.p.re.sourceforge.net>




I believe that IBM dropped REXX EHLLAPI support in newer windows versions
of PCOMM


   According to the PersComm 13.0 Readme the HLLAPI RExx Interface was
   re-introduced with 13.0
   
https://www.ibm.com/docs/en/personal-communications/13.0?topic=files-version-130

So it should be possible to use the known Rexx APIs as well.

---rony


On 30.06.2023 09:45, Rony G. Flatscher wrote:

Just noted that the mailer ruined the syntax:

       autoECLConnList = .OleObject~new("PCOMM.autECLConnList")
       autoECLConnList~Refresh
       str = autECLConnList(1)~Name

---rony


On 30.06.2023 09:22, Rony G. Flatscher wrote:

On 30.06.2023 08:46, Farley, Peter wrote:
Thanks for the link David, but that seems to be tied intimately to x3270, and I need it to work 
with PCOMM.


Also investigating PCOMM HACL (Host Access Class Library) as an alternative, using VBScript 
(<*Sigh*>, yet another language to learn).


Judging from 
<https://www.ibm.com/docs/en/personal-communications/15.0?topic=SSEQ5Y_15.0.0/com.ibm.pcomm.doc/books/html/host_access08.html> 
there are OLE APIs which should allow you to use the Windows version of ooRexx as it supports 
OLE. That is the reason why you can code in ooRexx for MS Excel, MS Word, MS Powerpoint and the 
like, just look up the ooRexx samples in "ooRexx\samples\ole\apps" where you would see also 
samples for OpenOffice/LibreOffice via OLE.


So looking at the VBA example:

   |Dim Str as String Dim autECLConnList as Object Dim Num as Long Set 
autECLConnList =
   CreateObject("PCOMM.autECLConnList") autECLConnList.Refresh Str = 
autECLConnList(1).Name|

try the following in ooRexx:

   autoECLConnList = .OleObject~new(|PCOMM.autECLConnList")|
   autoECLConnList~Refresh
   str = autECLConnList(1)~Name

Does that work for you?

---rony


-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
David Crayford
Sent: Thursday, June 29, 2023 11:48 PM
To:IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Using EHLLAPI from ooRexx

It may be easier to 
usehttps://urldefense.com/v3/__https://github.com/py3270/py3270__;!!Ebr-cpPeAnfNniQ8HSAI-g_K5b7VKg!LslIz3RHy9Ct1CC2dStYVdn9sNVor2JieWkv62qKTHeNjTV8BP_GG59tue0S-FF-h_YqPRXXtxsO4U4NUCOrg08$ 


On 29 Jun 2023, at 10:56 pm, Farley, 
Peter<031df298a9da-dmarc-requ...@listserv.ua.edu> wrote:

Hi All,

I have sent this question to the ooRexx help list but have not yet seen an answer.  Hoping 
someone here has been down this path and can help cure my ignorance.


I have an automation task before me that needs some complex 3270 screen interactions, so I was 
hoping to use ooRexx from the company laptop (Windows 10) using the EHLLAPI interface to PCOMM.


I started with a simple logon script to learn the connection/setup requirements, and after (I 
thought) successfully executing rxfuncadd for the EHLLAPI interface, the first actual call to 
EHLLAPI (for the Connect function) gets oorexx error 43.1, cannot find routine EHLLAPI, 
indicating to me that the rxfuncadd did not really work.


Then it occurred to me to ask how does rxfuncadd know where to find the EHLLAPI DLL?  Is there 
some environment variable that needs to be set pointing to the PCOMM directory where the DLL is 
stored?


There is some old Rexx EHLLAPI interface material in the PCOMM V6 documentation available on 
the web, but I now have PCOMM V14 on my machine and it seems that the Rexx examples have 
disappeared from the V14 documentation (at least I didn't find any).


I am a little "lost at sea" here, so I would appreciate any help or RTFM you can provide.  Or 
better yet a publicly available set of example scripts for EHLLAPI interactions with PCOMM.


Peter


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Using EHLLAPI from ooRexx

2023-06-30 Thread Rony G. Flatscher

Just noted that the mailer ruined the syntax:

   autoECLConnList = .OleObject~new("PCOMM.autECLConnList")
   autoECLConnList~Refresh
   str = autECLConnList(1)~Name

---rony


On 30.06.2023 09:22, Rony G. Flatscher wrote:

On 30.06.2023 08:46, Farley, Peter wrote:
Thanks for the link David, but that seems to be tied intimately to x3270, and I need it to work 
with PCOMM.


Also investigating PCOMM HACL (Host Access Class Library) as an alternative, using VBScript 
(<*Sigh*>, yet another language to learn).


Judging from 
<https://www.ibm.com/docs/en/personal-communications/15.0?topic=SSEQ5Y_15.0.0/com.ibm.pcomm.doc/books/html/host_access08.html> 
there are OLE APIs which should allow you to use the Windows version of ooRexx as it supports OLE. 
That is the reason why you can code in ooRexx for MS Excel, MS Word, MS Powerpoint and the like, 
just look up the ooRexx samples in "ooRexx\samples\ole\apps" where you would see also samples for 
OpenOffice/LibreOffice via OLE.


So looking at the VBA example:

   |Dim Str as String Dim autECLConnList as Object Dim Num as Long Set 
autECLConnList =
   CreateObject("PCOMM.autECLConnList") autECLConnList.Refresh Str = 
autECLConnList(1).Name|

try the following in ooRexx:

   autoECLConnList = .OleObject~new(|PCOMM.autECLConnList")|
   autoECLConnList~Refresh
   str = autECLConnList(1)~Name

Does that work for you?

---rony


-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
David Crayford
Sent: Thursday, June 29, 2023 11:48 PM
To:IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Using EHLLAPI from ooRexx

It may be easier to 
usehttps://urldefense.com/v3/__https://github.com/py3270/py3270__;!!Ebr-cpPeAnfNniQ8HSAI-g_K5b7VKg!LslIz3RHy9Ct1CC2dStYVdn9sNVor2JieWkv62qKTHeNjTV8BP_GG59tue0S-FF-h_YqPRXXtxsO4U4NUCOrg08$ 


On 29 Jun 2023, at 10:56 pm, Farley, 
Peter<031df298a9da-dmarc-requ...@listserv.ua.edu> wrote:

Hi All,

I have sent this question to the ooRexx help list but have not yet seen an answer.  Hoping 
someone here has been down this path and can help cure my ignorance.


I have an automation task before me that needs some complex 3270 screen interactions, so I was 
hoping to use ooRexx from the company laptop (Windows 10) using the EHLLAPI interface to PCOMM.


I started with a simple logon script to learn the connection/setup requirements, and after (I 
thought) successfully executing rxfuncadd for the EHLLAPI interface, the first actual call to 
EHLLAPI (for the Connect function) gets oorexx error 43.1, cannot find routine EHLLAPI, 
indicating to me that the rxfuncadd did not really work.


Then it occurred to me to ask how does rxfuncadd know where to find the EHLLAPI DLL?  Is there 
some environment variable that needs to be set pointing to the PCOMM directory where the DLL is 
stored?


There is some old Rexx EHLLAPI interface material in the PCOMM V6 documentation available on the 
web, but I now have PCOMM V14 on my machine and it seems that the Rexx examples have disappeared 
from the V14 documentation (at least I didn't find any).


I am a little "lost at sea" here, so I would appreciate any help or RTFM you can provide.  Or 
better yet a publicly available set of example scripts for EHLLAPI interactions with PCOMM.


Peter


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


COBOL and the Java scripting framework ? (Re: Are there samples of COBOL methods or classes?

2023-06-30 Thread Rony G. Flatscher

On 28.06.2023 17:26, Tom Ross wrote:

Please check out the examples in the COBOL Programming Guide, in
Part 6. Developing object-oriented programs

GO here:https://www.ibm.com/support/pages/node/611415
Select which release you are interested in and then
click "Product Documentation"


thank you, Tom. Could get to  and from there to 
the programming guide at .


It seems that OO COBOL allows interacting with Java via JNI (Java native interface) only. 6.4 adds 
the ability to invoke static Java methods without OO COBOL.


Not having any of the necessary infrastructure (mainframe ;) , OO COBOL and Java) there is nothing I 
could do. So maybe just hinting of what would become possible if anyone with the OO COBOL-Java 
skills would come with showing how to code the following Java program in OO COBOL.


Such an example would serve as a nutshell example that would demonstrate how to invoke scripts from 
OO COBOL in any scripting language for which an implementation of javax.script.Engine exists 
including supplying arguments (stored in a Java array of type java.lang.Object) and fetching the result.


To make this as flexible (and thereby as usable) as possible, the following Java program will take 
the name of a file containing a script as a single argument, and then will load with the help of the 
Java scripting framework the appropriate scripting engine to execute the script, and supply as an 
argument the name of a Java system property which the script should return to the caller.


Here the Java code that should be transcribed to COBOL:

   import javax.script.*;
   import java.io.File;
   import java.io.FileReader;

   class Test
   {
public static void main (String args[])
{
if (args.length==0)
{
System.err.println("file name missing...");
System.exit(-1);
}
String fileName = args[0];// get filename
String extension= 
fileName.substring(fileName.lastIndexOf(".")+1);
ScriptEngineManager sem = new ScriptEngineManager();
ScriptEnginese  = sem.getEngineByExtension(extension);

Object result = null;
try
{
ScriptContext sc= se.getContext();
// add filename
sc.setAttribute(se.FILENAME, fileName  , sc.ENGINE_SCOPE);
// add some arbitrary arguments
Object scriptArgs[] = new Object [] { "first", "", "trois", null, 
"cinque" };
sc.setAttribute(se.ARGV, scriptArgs, sc.ENGINE_SCOPE);
// create a FileReader from File
FileReader f= new FileReader(new File(fileName));
result=se.eval(f);  // read and execute script
}
catch (Throwable t)
{
System.err.println("Oops, some exception occurred: "+t);
}
System.out.println("script's result: "+result);
System.exit(0);
}
   }

Here a Rexx file (can be any Rexx script):

   parse source s
   say "source :" s
   parse version v
   say "version:" v
   say "there are" arg() "arguments supplied:"
   do i=1 to arg()
   say "   #" i":" arg(i)
   end
   return 43

The Java program "Test", once compiled can then be used to run any script (not only Rexx) from a 
script file where the file extension determines which scripting language should get loaded to run 
the script in the file. Here an example of running the Java program supplying the name of a file 
containing a Rexx script:


   G:\tmp\bsf4oorexx\cobol>java Test rexxscript.rex
   REXXout>source : WindowsNT SUBROUTINE rexxscript_ori.rex
   REXXout>version: REXX-ooRexx_5.1.0(MT)_64-bit 6.05 6 Jun 2023
   REXXout>there are 6 arguments supplied:
   REXXout>   # 1: first
   REXXout>   # 2:
   REXXout>   # 3: trois
   REXXout>   # 4: The NIL object
   REXXout>   # 5: cinque
   REXXout>   # 6: a Slot.Argument
   script's result: 43

---

The script code can also be supplied directly as a String to the script engine's eval() method 
"res=eval(String scriptCode)", such that you could load the script code from a database in case you 
have it stored as such. The possibilities are endless.


As you can see, one can submit any value/object as an argument to the script and fetch any result of 
the script.


---

It would be interesting to see the above Java code transcribed to COBOL, so anyone with the 
necessary skills please give a helping hand for the community! :)


The result would be enabling COBOL programmers to invoke any kind of scripts in any kind of 
languages from COBOL exploiting the Java scripting framework.


Such scripts could e.g. dive deep into Java and serve the COBOL programs probably in an easier 
manner from then on. E.g., the following ooRexx script returns a sorted 

Re: Using EHLLAPI from ooRexx

2023-06-30 Thread Rony G. Flatscher

On 30.06.2023 08:46, Farley, Peter wrote:

Thanks for the link David, but that seems to be tied intimately to x3270, and I 
need it to work with PCOMM.

Also investigating PCOMM HACL (Host Access Class Library) as an alternative, using 
VBScript (<*Sigh*>, yet another language to learn).


Judging from 
 
there are OLE APIs which should allow you to use the Windows version of ooRexx as it supports OLE. 
That is the reason why you can code in ooRexx for MS Excel, MS Word, MS Powerpoint and the like, 
just look up the ooRexx samples in "ooRexx\samples\ole\apps" where you would see also samples for 
OpenOffice/LibreOffice via OLE.


So looking at the VBA example:

   |Dim Str as String Dim autECLConnList as Object Dim Num as Long Set 
autECLConnList =
   CreateObject("PCOMM.autECLConnList") autECLConnList.Refresh Str = 
autECLConnList(1).Name|

try the following in ooRexx:

   autoECLConnList = .OleObject~new(|PCOMM.autECLConnList")|
   autoECLConnList~Refresh
   str = autECLConnList(1)~Name

Does that work for you?

---rony


-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
David Crayford
Sent: Thursday, June 29, 2023 11:48 PM
To:IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Using EHLLAPI from ooRexx

It may be easier to usehttps://urldefense.com/v3/__https://github.com/py3270/py3270__;!!Ebr-cpPeAnfNniQ8HSAI-g_K5b7VKg!LslIz3RHy9Ct1CC2dStYVdn9sNVor2JieWkv62qKTHeNjTV8BP_GG59tue0S-FF-h_YqPRXXtxsO4U4NUCOrg08$  


On 29 Jun 2023, at 10:56 pm, Farley, 
Peter<031df298a9da-dmarc-requ...@listserv.ua.edu>  wrote:

Hi All,

I have sent this question to the ooRexx help list but have not yet seen an 
answer.  Hoping someone here has been down this path and can help cure my 
ignorance.

I have an automation task before me that needs some complex 3270 screen 
interactions, so I was hoping to use ooRexx from the company laptop (Windows 
10) using the EHLLAPI interface to PCOMM.

I started with a simple logon script to learn the connection/setup 
requirements, and after (I thought) successfully executing rxfuncadd for the 
EHLLAPI interface, the first actual call to EHLLAPI (for the Connect function) 
gets oorexx error 43.1, cannot find routine EHLLAPI, indicating to me that the 
rxfuncadd did not really work.

Then it occurred to me to ask how does rxfuncadd know where to find the EHLLAPI 
DLL?  Is there some environment variable that needs to be set pointing to the 
PCOMM directory where the DLL is stored?

There is some old Rexx EHLLAPI interface material in the PCOMM V6 documentation 
available on the web, but I now have PCOMM V14 on my machine and it seems that 
the Rexx examples have disappeared from the V14 documentation (at least I 
didn't find any).

I am a little "lost at sea" here, so I would appreciate any help or RTFM you 
can provide.  Or better yet a publicly available set of example scripts for EHLLAPI 
interactions with PCOMM.

Peter


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Are there samples of COBOL methods or classes?

2023-06-27 Thread Rony G Flatscher
> Am 27.06.2023 um 19:34 schrieb Tom Ross :
> 
> 
>> 
>> As the very first computer language I learned was COBOL, I have been always=
>> interested to learn=20
>> about OO COBOL but never had the necessary time to research it.
>> 
>> Are there by any chance simple COBOL snippets that would demonstrate how to=
>> use OO COBOL to interact=20
>> with Java (e.g. creating a Java object, invoking a simple method with argum=
>> ents and fetch the=20
>> returned value) and a comparable example for COBOL 6.4?
> 
> Are the examples of OO COBOL to Java that we include in the COBOL Programming
> Guide helpful?
Probably, would you have a link to it and also to the equvalent for 6.4?

Best wishes

—-rony
--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: CMS-like 'xmitmsg' for Linux (or Unix or MacOS or even Windoze)

2023-06-25 Thread Rony G. Flatscher

Hi Rick,

On 31.05.2023 21:50, Rick Troth wrote:

This was also posted to the Linux/390 list and the VM list, but seemed relevant 
for here too.

Over the past several days, I "cut a release" (that's GitHub speak) of the xmitmsgX package. The 
package mimics the behavior of the CMS 'XMITMSG' command. This is release 2.1.3 of the project. 
The facility on CMS is what provides uniform messages (e.g., error messages, but more than just 
for errors). I was actually shocked to learn (several years ago) that MVS doesn't have the same 
thing. (Though BPXMTEXT is a rough approximation of a partial subset.)
Several have commented that they find it handy to have this function on POSIX and Unix-like 
systems, so here it is.


The wizard from Oz had turned the crank several weeks ago on USS and provided feedback. (We thank 
ye.) I have rolled that in but have not yet been able to re-test (since I do not have access to 
USS myself).


Those who know and love Rexx should take note that this release includes support for Regina. 
Similar support for ooRexx will come later if I can either get some help or wrap my limited gray 
matter around the ooRexx interface. (Kinda complicated for me.)


... cut ...

ooRexx has the Rexx/SAA interface such that it should be possible to use ooRexx 
for it as well.

More than ten years ago ooRexx 4.0 introduced an additional, powerful native API that is comparable 
to JNI (Java native interface) which allows exploiting the message paradigm introduced with ooRexx 
also from C, C++, but also directly interact e.g. with ooRexx arrays and much more, cool stuff.


If you have ooRexx installed there are samples that demonstrate how one would go about creating 
external Rexx function libraries, and in addition also external Rexx method libraries. Just look up 
"samples/api/classic" and "samples/api/c++" and the respective readme.txt files.


It is actually quite easy as you will see.

HTH,

---rony

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Are there samples of COBOL methods or classes?

2023-06-25 Thread Rony G. Flatscher
As the very first computer language I learned was COBOL, I have been always interested to learn 
about OO COBOL but never had the necessary time to research it.


Are there by any chance simple COBOL snippets that would demonstrate how to use OO COBOL to interact 
with Java (e.g. creating a Java object, invoking a simple method with arguments and fetch the 
returned value) and a comparable example for COBOL 6.4?


Maybe something like interacting with the Java runtime environment like this 
(in Java):

   import javax.script.*;

   class Test
   {
public static void main (String args[])
{
ScriptEngineManager sem = new ScriptEngineManager();
ScriptEnginese  = sem.getEngineByName("rexx");
String code   = "say 'Hello world from Rexx!';\n return 43";
Object result = null;
try
{
result=se.eval(code);
}
catch (ScriptException sexc)
{
System.err.println("Oops, ScriptException occurred: "+sexc);
}
System.out.println("script's result: "+result);
System.exit(0);
}
   }

 The above program actually works if BSF4ooRexx is installed and yields:

   G:\tmp\bsf4oorexx\cobol>java Test
   REXXout>Hello world from Rexx!
   script's result: 43

The documentation of the Java scripting framework's javax.script package can be found here: 
 .


---

It would be really interesting to see how one would use OO COBOL and COBOL 6.4 to interact with the 
Java runtime environment and e.g. exploit the Java scripting framework.


---rony

P.S.: SOM has been a very interesting and exciting technology and I always have found it a little 
bit sad that it was abandoned. It was possible in the OS/2 days to subclass the WPS SOM folder class 
in Object REXX and add password access protection to it in about 15 lines of Object Rexx code, it 
was just great (and for many to this day unbelievable  how easy and how powerful that was).



On 29.05.2023 00:40, Tom Ross wrote:

Hi, While working on the earlier problems I had, I ran into the concepts=20
of COBOL Methods and Classes, and understand they can be used for Java=20
in addition to regular COBOL programs. The documentation does not=20
explain the "why" behind these or the "how" and "what", so I wonder if=20
anyone has any business case explanations of what these are or samples=20
of some COBOL-only implementations so I can see why I might want to use=20
them and how to do it?

I like to keep my COBOL current and if there is a way to use COBOL more=20
effectively, I hope you can help me understand this!


OO COBOL was added to COBOL to provide a way to communicate with Java, which
does not have programs that can be called.  Java has to run in the JVM, and
you INVOKE methods in CLASSes with Java, you do not CALL programs.  So, in
order to support this we created OO COBOL (the 2nd generation, 1st gen OO COBOL
was based on SOM if anyone remenber that in the late 1990s).  OO COBOL is only
for communicatiing for Java, unless you REALLY prefer OO programming.  The real
worl is not object oriented...we do no instantiate a customer object and then
invoke a 'send_a_bill' method on that object.  We procedurally decide that it
is time to send a cusotmer a bill and do it!

Haivng said that, we now have an easier way to allow COBOL to use Java code,
actually using the COBOL CALL statement, this new feature is available in
COBOL 6.4.  If you do not need to communicate with Java, I would not
recommend OO COBOL.  The promise of Object Oriented Programing in the 1990s
has not materialized.  Re-usable tested mehods that could be re-used to build
applications  it just not really happening!  One of my fellow IBMers left
IBM for a start up and was slinging Java all day, and found it much easier to
code new methods than to search through class libraries for pre-tested parts.

Having said all that, it was pointed out earlier that we have seample in the
COBOL Programing Guide for comunicating woith Java using OO COBOL.  OO COBOL
was not designed to be used in a pure COBOL application, so no examples of
that.

Cheers,
TomR  >> COBOL is the Language of the Future! <<

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email tolists...@listserv.ua.edu  with the message: INFO IBM-MAIN


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Logical Nor (¬) in ASCII-based code pages?

2023-05-07 Thread Rony G. Flatscher

On 07.05.2023 19:41, Phil Smith III wrote:

Seymour J Metz wrote:

I've seen Logical Not () at AA and at AC. Are there and ASCII-based
code pages that have it at a third position? Put another way, is there
a third code point that ooRexx and Regina should recognize as ?

And later:

UTF-8 is just a transform of Unicode, and the Unicode code point is
AC. The string C2AC is just a way of encoding AC.

Not quite. Yes, hex C2AC is the UTF-8 encoding of the Unicode NOT sign. Unicode 
is a list of code points and, as you said, UTF-8 is an encoding. The Unicode 
code point is U+00AC. It is NOT “AC”, nor “hex AC”. Yes, I’m being picky, but 
this matters. The point is, U+00AC—the Unicode expression of that code 
point—has a specific meaning, which then *must* be encoded somehow (UTF-8, 
UTF-16, UTF-32); “AC” is meaningless in a Unicode context.

This is especially confusing since “plain ol’ ASCII” maps directly to the first 
part of UTF-8-encoded Unicode. This is of course A Good Thing in general, but 
lets people cheat and get away with it—until they don’t.

It gets even more confusing because ISO 8859-1 *looks* like Unicode in that, 
for example, a hex AC is the NOT sign in 8859-1. But that’s 8859-1, not 
Unicode, not UTF-8. A hex AC *is not a character* in UTF-8: it’s an error. I’ve 
seen customers take data that’s UTF-8 and think it’s 8859-1. This mostly works. 
“Mostly” is not good.

As for your original question, I’m more than willing to believe in some code 
page with hex AA as the NOT sign, just never seen it. Hard to search for, too, 
alas. Do you know what page that is?

I’m a bit chary* of blindly accepting multiple code points as NOT signs. Better 
to know how your input is encoded (or mandate it). Unless, of course, it can be 
demonstrated that this particular multilingualism cannot be misinterpreted.

...phsiii

*no “char” pun intended


It seems that there is also a wide not code point (Fullwidth not sign): 
.

also, if one clicks "show more" button in the "Representations" section at the top of 
 then one gets a list of encodings of the not sign.


---rony

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: interfacing C with Rexx

2023-04-28 Thread Rony G. Flatscher

On 28.04.2023 01:07, David Crayford wrote:

... cut ...


I'll fork the repo and then push up my changes  on a zos branch and post here. I'm will be turning 
issues off!!


I have to say that Regina REXX is quite good compared to z/OS REXX. Of course, it doesn't have the 
TSO/ISPF integrations but it does come with a utilities library with extra features such as 
copying/sorting stem variables etc. It also ships with a "rxstack" daemon which can be used for 
IPC. There are also extensions for associated arrays which can be passed to functions unlike stem 
variables. It's 3x faster then z/OS REXX, although that doesn't surprise me! As you mentioned, 
it's dirt easy to extend with C so it would be trivial to write a package that supports MVS data 
set I/O similar to my pyzfile Python package or sorted sets, algorithms etc.


... cut ...

Very interesting! Also applauding making your Regina port available!

If it is 3x faster then z/OS REXX then one could expect that speed improvement 
for ooRexx as well.

---rony

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: interfacing C with Rexx

2023-04-25 Thread Rony G. Flatscher

On 25.04.2023 14:48, Rick Troth wrote:

good questions

The library that I want to call is "just C", pretty clean, standard POSIX. My development platform 
is PC Linux. The package gets built and tested on other platforms as often as I can drive that, 
notably FreeBSD.


I don't have access to USS for dev/test. (But if anyone is offering ...)

There's no specific need to interrogate nor to set Rexx variables. The goal is a function which 
takes arguments and returns a string. The Rexx function has sub-functions named by the first 
argument. It works a lot like Rexx/Sockets (return string is the RC followed by either an error 
string or by desired results, if any).


Interfacing with Regina is pretty easy. Regina's header in this case is named "rexxsaa.h", so 
presumably adheres to SAA norms. I confess I have NOT TRIED linking against ooRexx. Thought I 
should first ask others who have tread that road.


ooRexx comes with samples for C and C++ that demonstrate how easy it is to create external functions 
(and external method routines) for it.


Linux: /usr/local/share/ooRexx/samples/api
Windows: C:\Program Files\ooRexx\samples\api

If you get the "portable" version of ooRexx (a plain zip archive with a readme.txt file) from 
 for your operating 
system, download the full package which includes the samples in its zip archive, so it would be a 
simple unzip to get at the samples, documentation etc.


The documentation for the C/C++ API is in the PDF book named "rexxapi.pdf" (the full ooRexx 
reference can be found in the PDF book named "rexxref.pdf").


---rony

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Fwd: 34th International Rexx Symposium - registration page

2023-04-15 Thread Rony G. Flatscher
In the middle of May there will be this year's International Rexx Symposium taking place in Almere, 
The Netherlands, and which can also be attended via Zoom from anywhere in the world. Enclosed please 
find the respective announcement (the non-profit Rexx Language Association, RexxLA, is the 
organizer) which will will have links to this year's (tentative) program on its website.


---rony

P.S.: RexxLA  has changed its membership model such that membership is free 
(with donations always welcome): .



 Forwarded Message 
Subject:[rexxla-members] 34th International Rexx Symposium - 
registration page
To: rexxla-memb...@groups.io



Dear Members of the Rexx Language Association,

organization of our yearly Rexx Symposium is in full swing, and we have - like every year - some 
excellent presentations planned. Please register yourself on this page: 
https://www.rexxla.org/document.rsp?base=events=2023=registration.html=Symposium%20Registration%20and%20Tickets 



Some remarks: although the schedule is nearing completion, there is room for more presentations; 
because there is room for shorter presentations, we have more flexibility than previous years. If 
you want to join in person, you are more than welcome. Because it turned out to be not feasible, 
looking at the budget we have, and the expected attendance, to go for a central Amsterdam location, 
I have to backpedal on that: it will be at the ICU Office in Almere, like the previous symposia in 
the Netherlands. A heartfelt thank you to the management of ICU; they are great friends of RexxLA 
and have helped us out this year again.


All social events and dinners however, will be in the Amsterdam City Centre. There will be an 
informal parallel schedule for cultural & shopping activities which can include the sites The 
Netherlands is famous for.


We know it is a different world after the pandemic - but we found it too important to meet in person 
to limit RexxLA to online symposia. So for the foreseeable future we will have in-person events 
every year, to have an opportunity to meet each other. We hope to see you this year in the Netherlands!


Note that if you present, you have the guarantee of being a published author - RexxLA Press is being 
set up and will publish the proceedings.


best regards,

René Vincent Jansen President, RexxLA


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: REXX, ooRexx, BSF4ooRExx (Re: Ad TCP/Socket programs in REXX (Re: Mainframe REXX (Re: Badmouthing Rexx and ooRexx - again (Re: zOSMF and zOWE for non-mainframers

2023-03-09 Thread Rony G. Flatscher

On 08.03.2023 02:30, David Crayford wrote:

On 8/3/23 02:26, Rony G. Flatscher wrote:
There also appears to be bugs in SysThread where the "attached" member variable is not 
initialized in the constructor that takes a pthread_t argument.


Ah, interesting that this is regarded a stumbling block, how about pthread_getunique_np() or such 
then?



Obviously, the "_np" suffix stands for "non-portable". It doesn't exist on z/OS! I happen to know 
the internal structure of the opaque pthread_t structure on z/OS and to extract the thread ID (TCB 
address) one would implement something like:


int gettid() { return (int)(pthread_self().__ & 0x7fff); }


Erich, a developer, has applied a fix that should make it possible to get over this on z/OS with an 
elegant solution, here his respective comment:


   Committed code fix with revision [r12649]
   As reported by David Crayford, pthread_t is a struct on z/OS and setting or 
casting it, fails

Good luck with your next attempt to compile ooRexx on z/OS and please let us 
know how you fare!
:)

---rony


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


REXX, ooRexx, BSF4ooRExx (Re: Ad TCP/Socket programs in REXX (Re: Mainframe REXX (Re: Badmouthing Rexx and ooRexx - again (Re: zOSMF and zOWE for non-mainframers

2023-03-07 Thread Rony G. Flatscher

On 07.03.2023 08:45, David Crayford wrote:

On 7/3/23 02:39, Rony G. Flatscher wrote:

On 06.03.2023 02:43, David Crayford wrote:


... cut ...

I did notice that CMake is being used for the build. That's good as IBM have ported CMake to z/OS. 
It's hidden away on a personal Github repo by an ex-IBMer who used to work in the Java JIT team. I 
may mention that to IBM.


Anyway, I digress. ooRexx still have the same portability issues as before. For example, it 
assumes that 'phread_t' is a integer. On z/OS, System i, BSD etc it's an opaque type, a struct.


In file included from 
/u/ts8004/git/ooRexx/common/platform/unix/SysSemaphore.hpp:51:
/u/ts8004/git/ooRexx/common/platform/unix/SysThread.hpp:70:36: error: no matching constructor for 
initialization of 'pthread_t'

    SysThread() : attached(false), _threadID(0) { ; }
   ^ ~
/usr/include/sys/types.h:300:19: note: candidate constructor (the implicit copy constructor) not 
viable: no known conversion from 'int' to 'const pthread_t' for 1st argument

  typedef struct {
  ^
/usr/include/sys/types.h:300:19: note: candidate constructor (the implicit move constructor) not 
viable: no known conversion from 'int' to 'pthread_t' for 1st argument
/usr/include/sys/types.h:300:19: note: candidate constructor (the implicit default constructor) 
not viable: requires 0 arguments, but 1 was provided

In file included from /u/ts8004/git/ooRexx/rexxapi/client/ClientMessage.cpp:41:
In file included from 
/u/ts8004/git/ooRexx/rexxapi/client/LocalAPIManager.hpp:47:
In file included from 
/u/ts8004/git/ooRexx/common/platform/unix/SysSemaphore.hpp:51:
/u/ts8004/git/ooRexx/common/platform/unix/SysThread.hpp:86:17: error: cannot convert 'pthread_t' 
to 'uintptr_t' (aka 'unsigned long') without a conversion operator

 return (uintptr_t)_threadID;
    ^~~~
/u/ts8004/git/ooRexx/common/platform/unix/SysThread.hpp:89:37: error: cannot convert 'pthread_t' 
to 'size_t' (aka 'unsigned long') without a conversion operator

    inline size_t hash() { return (((size_t)_threadID) >> :sunglasses: * 37; }

IBM warns about this in it's documentation 
https://www.ibm.com/docs/en/i/7.1?topic=ssw_ibm_i_71/apis/concep17.html


Amazon have been fixing this bug in their C SDK 
https://github.com/awslabs/aws-c-io/issues/217

There also appears to be bugs in SysThread where the "attached" member variable is not initialized 
in the constructor that takes a pthread_t argument.


Ah, interesting that this is regarded a stumbling block, how about 
pthread_getunique_np() or such then?


... cut ...

I you want to attract people to work on ooRexx then I suggest modernizing the development 
pipeline. Move everything to Github. Nobody wants to use Subversion anymore and you can create 
wikis and improve the documentation.


Sorry, there are lots of projects that use subversion, despite the big trend to Github and the 
likes. Therefore there are some who also shadow ooRexx in github informally.




I would be interested to know to average age of the commiters.


Probably younger than you in the average! ;)


... cut ...


BSF4ooRexx even allows you to implement abstract Java methods in ooRexx, wich is actually very 
easy! :)


Does it support lambda functions?


Of course! Java lambda functions get defined as interface classes. As I mentioned BSF4ooRexx adds 
the ability to use Rexx classes to implement abstract Java methods and also Java interface classes.



Here an example which uses a Predicate and a Consumer function implemented in a Rexx class named 
"Worker":


   -- the Rexx class "Worker" see below implements the abstract function 
methods in ooRexx methods
   wordstring="Just a bunch of words to test for killer items containing a K."
   arrWords  =.bsf~new("java.lang.String", wordstring)~split(" ") -- returns a 
Java String array

   -- create a RexxProxy of our Worker class, tell Java the interfaces it 
supports
   rexxWorker= 
BsfCreateRexxProxy(.worker~new,,"java.util.function.Predicate","java.util.function.Consumer")

   clzArrays =bsf.loadClass("java.util.Arrays") -- load the Java class in order 
to use its stream() method

   -- create a stream use its "filter" (needs a Predicate function) method, 
return an array
   arr=clzArrays~stream(arrWords) ~filter(rexxWorker) ~toArray
   say "words containing 'k' or 'K':"
   say
   do y over arr -- iterate over array, display its elements
  say "   ["y"]"
   end
   say

   say "all words in array:"
   say
   -- create stream use its "forEach" method (needs a Consumer function): 
accepts and displays every word
   clzArrays~stream(arrWords) ~foreach(rexxWorker) -- accept each word (a 
Consumer function)

   *::requires BSF.CLS -- get the ooRexx-Jav

Re: Ad TCP/Socket programs in REXX (Re: Mainframe REXX (Re: Badmouthing Rexx and ooRexx - again (Re: zOSMF and zOWE for non-mainframers

2023-03-06 Thread Rony G. Flatscher
 and only use Python, just because they know it, is simply not professional 
and unbearable for professionals. (It looks like the famous hammer philosophy, usually a recipe for 
desaster...)


However, this is not to say to not learn or to use Python (or any other, additional language)! Use 
Python everywhere where its application gives you noticeable benefits (saving time, saving costs, 
enabling something that is not possible otherwise and the like).


That is also the reason why in today's world it is important to learn and use Java which is a 
stunning, professional programming and runtime environment that carries not only more functionality 
in form of class libraries than any other language. Deploying Java, taking advantage of Java is of 
strategic importance for any company IMHO.


The reason I evangelize Python on z/OS is because I can see that IBM are backing it and it's 
strategic. I recently noticed IBM have released the Python AI Toolkit for z/OS which is free of 
charge. Exciting times ahead.


https://www.ibm.com/common/ssi/ShowDoc.wss?docURL=/common/ssi/rep_ca/1/897/ENUS223-021/index.html=en_locale=en 



This is fine and o.k. as the Python tool can be used for that application area.

Do you realize, that if it is possible to use Java for exploiting this technology then that is 
already enough for ooRexx+BSF4ooRexx and of course also for NetRexx to be used for it? (No need for 
an extra library for a specific programming language to be created and to be made available as is 
the case with Python here.)


Ad COBOL-Java that gets stressed in the context of that announcement in 
<https://www.ibm.com/common/ssi/ShowDoc.wss?docURL=/common/ssi/rep_ca/3/897/ENUS223-013/index.html=en_locale=en>: 
it may be interesting for COBOL programmers to know that thanks to the COBOL-Java bridge one could 
employ/dispatch REXX scripts, believe it or not and even supply arguments (even Java objects, if 
needed) and fetch return values!


The secret here lies in the standard Java scripting framework (the package javax.script) which makes 
it really *easy* to use any scripting language for executing scripts or macros. BSF4oRexx comes with 
a wealth of instructive nutshell samples in "samples/Java/javax.script" or the equivalent samples in 
NetRexx "samples/NetRexx/javax.script". These nutshell samples go from simple to powerful, 
demonstrating how easy it is to have a REXX/ooRexx script execute via Java/NetRexx and even 
supplying arguments and fetching return values to/from these Rexx scripts.


ooRexx+BSF4oorexx, NetRexx: powerful, helpful stuff and best: really *easy* to 
learn and easy to use! :)

---rony




On 6/3/23 04:16, Rony G. Flatscher wrote:

Comment, asking:

    > Like what? Have you ever tried to write a TCP server in REXX?

Comment, receiving:

    > Start here and it is reasonably simple:


    - TCPIP.SEZAINST(RSSERVER)
    - TCPIP.SEZAINST(R6SERVER)


Comment: so writing a TCP server in REXX is not only theoretically possible, but a reality. 
Interesting what happens next:



    Thanks for the links. Now, there is code duplication between the two 
modules. How would one go
    about externalizing the common code to a module?

    The method of maintaining the socket descriptor list is crude and 
highlights the lack of data
    structures in classic REXX.

    Writing a non-blocking, multiplexing TCP server in Python is simple
https://docs.python.org/3/library/selectors.html

Comment: surprisingly bringing up totally different items/aspects (somehow as "if you can, 
confuse/sidetrack/derail them"). The answer is: if one has a need for a TCP server or a TCP 
client in REXX one can create and use one as has been pointed out.


There have been no questions asked about how to go about "writing a non-blocking, mulitplexing 
TCP server in Python". If there was a need to "write a non-blocking, multiplexing TCP server in 
Python" why was that particular question not asked in the first place?


OTOH if the need is for REXX servers and/or clients (the original question) that employ "a 
non-blocking, mulitplexing TCP server" (the new, derailing questions) and one wishes to code that 
in REXX one can either look for REXX function libraries supplying the needed infrastructure, or 
create such interfaces to such libraries, or use NetRexx or BSF4ooRexx, which get one even more 
powerful abilities due to be immediately able to exploit the multiplatform, tested, cunning Java 
class libraries that come for free with Java. :)


Here slides where business administration students who learn programming (in a course named 
"Business Programming") as novices (!) in the second part of the semester (after two months 
learning Rexx and then ooRexx from scratch) having become able to use all of Java as a huge 
external ooRexx function and class library: 
<https://wi.wu.ac.at/rgf/wu/lehre/autojava/material/foils/230_AutoJava_Sockets_V05.

Ad TCP/Socket programs in REXX (Re: Mainframe REXX (Re: Badmouthing Rexx and ooRexx - again (Re: zOSMF and zOWE for non-mainframers

2023-03-05 Thread Rony G. Flatscher

Comment, asking:

> Like what? Have you ever tried to write a TCP server in REXX?

Comment, receiving:

> Start here and it is reasonably simple:


- TCPIP.SEZAINST(RSSERVER)
- TCPIP.SEZAINST(R6SERVER)


Comment: so writing a TCP server in REXX is not only theoretically possible, but a reality. 
Interesting what happens next:



Thanks for the links. Now, there is code duplication between the two 
modules. How would one go
about externalizing the common code to a module?

The method of maintaining the socket descriptor list is crude and 
highlights the lack of data
structures in classic REXX.

Writing a non-blocking, multiplexing TCP server in Python is simple
https://docs.python.org/3/library/selectors.html

Comment: surprisingly bringing up totally different items/aspects (somehow as "if you can, 
confuse/sidetrack/derail them"). The answer is: if one has a need for a TCP server or a TCP client 
in REXX one can create and use one as has been pointed out.


There have been no questions asked about how to go about "writing a non-blocking, mulitplexing TCP 
server in Python". If there was a need to "write a non-blocking, multiplexing TCP server in Python" 
why was that particular question not asked in the first place?


OTOH if the need is for REXX servers and/or clients (the original question) that employ "a 
non-blocking, mulitplexing TCP server" (the new, derailing questions) and one wishes to code that in 
REXX one can either look for REXX function libraries supplying the needed infrastructure, or create 
such interfaces to such libraries, or use NetRexx or BSF4ooRexx, which get one even more powerful 
abilities due to be immediately able to exploit the multiplatform, tested, cunning Java class 
libraries that come for free with Java. :)


Here slides where business administration students who learn programming (in a course named 
"Business Programming") as novices (!) in the second part of the semester (after two months learning 
Rexx and then ooRexx from scratch) having become able to use all of Java as a huge external ooRexx 
function and class library: 
 (the slides 
also demonstrate how to take advantage of the Java SSL/TLS classes, it is actually quite easy). This 
demonstrates among other things how easy it becomes to exploit Java from ooRexx for creating TCP 
server and clients, and as one can see it is even easy doing the same with employing Java's SSL/TLS 
from the Rexx programs! [BTW this has become possible because of ooRexx dynamic and message based 
nature. Java objects suddenly understand ooRexx messages, the case of spelling method names or field 
names is not relevant anymore and some more. Or invoking Java methods on the Java RexxProxy class 
causes messages to be sent off to the proxied Rexx object and some more.]


Compare the Python library above with what Java allows for, here a nice overview article about it: 
. 
Anything you see in the discussion about the POSIX definitions (that shine through that Python 
library above and as such mandates the knowledge about it) , the explanations about blocking, 
non-blocking, synchroneous, asynchroneous, multiplexing followed by the overview of respective Java 
classes in an overview form as well as the nutshell Java samples (using Sockets, NIO, NIO2) can be 
directly and immediately used/exploited from REXX in the form of ooRexx and NetRexx, where NetRexx 
will even create native Java classes from your Rexx code (running at the speed of native code). If 
wanting to keep the interactivity of an interpreter, the dynamics and the flexibility of ooRexx at 
runtime then use that.


The point here is simple: everyone who has REXX skills can rather easily and immediately take 
advantage of ooRexx or NetRexx.


The design principle of "human-centricness" of REXX defined by its inventor Mike F. Cowlishaw has 
been successfully applied for these two Rexx languages as well, making it even for newcomers 
(novices, see above!) easy to learn and take advantage of these Rexx languages (as a matter of fact 
Mike F. Cowlishaw also designed NetRexx at IBM which later got open-sourced and gets further 
developed by RexxLA.org).


Just try out these REXX variants, experiment a little bit, they open totally new doors in addition 
to those you have been enjoying with classic REXX already, hence it will pay in any case.

:)

---rony

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Takeaway from the mentioned book referring BLAS in context of Python, Java, C ... Re: Mainframe REXX (Re: Badmouthing Rexx and ooRexx - again (Re: zOSMF and zOWE for non-mainframers

2023-03-01 Thread Rony G. Flatscher

On 01.03.2023 15:15, René Jansen wrote:

Well yes - that is really apples and oranges, and thanks for proving my point.

Numpy leverages hand tuned assembly (BLAS) with hinting for different chip 
levels and architectures, and the difference with plain python is shown 
here:https://en.algorithmica.org/hpc/complexity/languages/  You can of course 
integrate OpenBLAS into everything.


... cut ...

The above chapter from the above URL has an interesting Takeaway at the end of that chapter, 
worthwhile citing in the context of this thread:



 # 
Takeaway

   The key lesson here is that using a native, low-level language doesn’t 
necessarily give you
   performance; but it does give you /control/ over performance.

   Complementary to the “N operations per second” simplification, many 
programmers also have a
   misconception that using different programming languages has some sort of 
multiplier on that
   number. Thinking this way and comparing languages
    in 
terms of performance
   doesn’t make much sense: programming languages are fundamentally just tools 
that take away
   /some/ control over performance in exchange for convenient abstractions. 
Regardless of the
   execution environment, it is still largely a programmer’s job to use the 
opportunities that the
   hardware provides.

---rony

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Mainframe REXX (Re: Badmouthing Rexx and ooRexx - again (Re: zOSMF and zOWE for non-mainframers

2023-03-01 Thread Rony G. Flatscher

On 28.02.2023 20:55, David Crayford wrote:
I respectfully express my opinion without intending to badmouth anyone. I believe that 
benchmarking the performance of reading a large file is not an artificial test but rather a 
real-world use case that we encounter regularly. It is no secret that REXX on z/OS can be slow. In 
fact, one of my colleagues who worked on the IBM File Manager product, which incorporates REXX 
scripting, developed their own subset of REXX because the performance of the TSO REXX interpreter 
did not meet their objectives.


If that is the case then it shows that IBM needs to maintain their mainframe REXX by replacing it 
with an up-to-date version of REXX (finally).


ooRexx would be a candidate as extending it with external function packages and Rexx command 
handlers can be done with C++ and Java. ooRexx was developed by IBM and has been put into 
open-source by the Rexx Language [1] association after having received the source code by IBM for 
that purpose.


Besides allowing the REXX coding knowledge to be used/applied immediately, a lot of benefitial 
abilities would become available at a finger tip, including among other things the ability to 
quickly create datastructures (classes) with attributes and routines if needed and gaining an 
incredible flexibility (to ease coding problems) with the incorporated message paradigm making it a 
natural language for any message/queue based infrastructures.


Of course, such a port needs to be done by knowledgeable and professional people who have no hidden 
agenda to make it (or any other interpreted language) look bad, au contraire, having the motivation 
to get the best possible port for mainframes and thereby for REXX programmers on the mainframe.


As ooRexx is CMake based this should be quite feasible for such a huge computer company (having so 
many excellently skilled employees) like IBM.


---rony

[1] Rexx Language Association (RexxLA): 

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Badmouthing Rexx and ooRexx - again (Re: zOSMF and zOWE for non-mainframers

2023-02-28 Thread Rony G. Flatscher

On 28.02.2023 16:15, Seymour J Metz wrote:

What happens if you change the benchmark to use the array class and DO OVER?


Not much. ooRexx uses references to objects which can be of any type unlike strictly typed languages 
that restrict the types that can be assigned to arrays. Any such stored object can be sent a message 
to, which needs to be resolved at runtime (very dynamic system opening up a lot of flexibility). So 
resolving the references costs time (which is actually not bad at all). Also ooRexx does not preset 
the array to be of a certain capacity, the ooRexx array will grow as needed.


In the case of primitive types like longs additional optimizations can be applied like laying out 
the values in contiguous memory sections, each entry being the same size a long needs, allowing 
looping over it very efficiently (cf. e.g. C's pointer arithmetics), able to directly load into 
registers and apply machine instructions directly without a need for conversions. So the 
optimizations that the compiler is able to apply can make the compiled code faster (or slower) 
depending on the compiler one uses, in this case where the datatype is a primitive it is blazingly 
fast compared to running non-compiled code.


One more thing that kicks in here allowing ooRexx to be faster than C++ is taking implicitly 
advantage of Java's JIT (just in time compiler) at runtime which gets optimized from Java release to 
Java release taking advantage of the host's processor features if possible at all. There is nothing 
special that needs to be done, it depends on the version of Java that gets used, the newer the 
better in this case as Java constantly gets the latest advances in optimizations from many different 
experts in the field some specialized on specific processors.


Java has become a huge cooperation among many different and important companies, from Amazon, IBM, 
Micrsoft (!), Oracle, SAP and many more, the OpenJDK allowing to get the knowhow from academia as 
well. It is really a good strategic choice for many reasons IMHO, including being able to take 
advantage of all of Java from ooRexx in an easy ("human-centric") manner.


---rony

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Badmouthing Rexx and ooRexx - again (Re: zOSMF and zOWE for non-mainframers

2023-02-28 Thread Rony G. Flatscher

On 28.02.2023 13:44, David Crayford wrote:
ooRexx has two main issues: its a superset of REXX, which is a subpar programming language, and it 
consumes a lot of CPU resources. Each language clause in ooRexx is a C++ object that invokes 
dynamic dispatch whenever it's executed. Unlike most other sensible programming languages, which 
compile to bytecode and use a virtual machine, ooRexx does not. When I benchmarked OoRexx against 
Lua, I was surprised to find that it was almost 100 times slower. I used valgrind to profile 
ooRexx's performance and discovered that most of the time was spent allocating and marking objects 
for garbage collection. These objects were language metadata used by the interpreter. ooRexx is an 
example of how not to implement a language interpreter in C++.


A lot of badmouthing and red herrings here (again), comparing apples with oranges (again). Totally 
ignoring what has been discussed and concluded a year ago, so no reliability on you.


Last year there was a discussion with the subject that over time got superceeded with mailings of 
different focuses:


- "Top 8 Reasons for using Python instead of REXX for z/OS", which then ended 
in the subject:

- "Speedy, speedier, speedest (Re: Ad message paradigm (Re: Ad NetRexx (Re: Ad programming features 
(Re: ... Re: Top 8 Reasons for using Python instead of REXX for z/OS"


In that thread I demonstrated a little ooRexx program that did beat your impertinent "test program" 
that you implemented in C++, Lua and Python last year (still wondering why you did not implement 
that simple benchmark in Assembler and show those figures). After learning about that ooRexx program 
that actually performed faster than C++ (Lua and Python of course as well) you preferred to stop 
that thread of discussion about a year ago. Now you are back, maybe speculating everyone forgot 
about it?


The purpose of your "test program" was quite obviously to make Rexx and ooRexx look as bad as 
possible. The same intent as your current message in your posting like: "ooRexx is an example of how 
not to implement a language interpreter in C+." (which is nonsense).


Your artificial "test/benchmark program" that let C++, Lua, Python shine at first and make 
Rexx/ooRexx look quite bad was designed exactly for that purpose: let strictly typed and compiled 
languages be way ahead of dynamically typed and interpreted languages, so:


- create an array of size of ten million (sic!) of (primitive) type long
- fill the array in a loop and assign each index the result of taking the index value (an int being 
cast to long) to the square

- go through that array and get the largest stored long value and display it

BTW, who has a real need for such programs in her/his daily life here? (In this community who would 
really come up with the idea of implementing such a task in Rexx/ooRexx and not in Assembler if a 
real need existed?)


So this everyday (not!) "benchmark" is designed to make dynamically typed and interpreted languages 
look as bad as possible compared to strictly typed, compiled languages! It would be like comparing 
number crunching Rexx/ooRexx programs with the same programs implemented in Assembler and concluding 
Assembler is much better in general and forego Rexx/ooRexx (and ignoring the many other use cases in 
which Rexx/ooRexx is much better than Assembler can possibly be; any language has its strengths and 
its weaknesses, of course, including C++, Lua, Python, ...)!


It is an artificial test program. Still, it is possible to beat strictly typed, compiled languages 
with dynamically typed, interpreted languages like ooRexx as demonstrated last year in this mailing 
list! You just need to use your brain and the infrastructure that is available to you.


The technique has been rather simple: like it is the case with external function packages for 
Rexx/ooRexx (to e.g. interact with system services, RDBMS etc.) look for a package/environment that 
is strictly typed and compiled and which one can take advantage of. In this particular show case I 
picked Java/NetRexx (NetRexx compiles to Java byte code, so one can write with the Rexx syntax 
genuinely Java programs; NetRexx is rather easy to learn for Rexx-savvy programmers) as an external 
package.


BTW, in the meantime I added the respective ooRexx examples to the ooRexx-Java bridge named 
"BSF4ooRexx850" (makes all Java class libraries directly available to ooRexx and camouflages Java as 
ooRexx, i.e. making Java objects understand ooRexx messages, in general allowing for ignoring strict 
casing and much more) to demonstrate how to exploit Java/NetRexx for this kind of use case from ooRexx.


Here the ooRexx program exploiting Java ("samples/4-601_compileAndRunEmbeddedJava1.rxj") for 
carrying out that stupid task, the Java code is given in the resource directive (allows for placing 
and retrieving any text in an ooRexx program) named "squares.java":


--- cut ---

   signal on syntax /* in case a 

Re: TEAMS usage

2023-02-08 Thread Rony G Flatscher
Well, it is interesting to see how companies (actually the management) who have 
a need of secrecy and privacy shelter take it for granted that other companies 
become able to spy on them rather easily. 

Conference meetings allow at least for learning about who is meeting with whom 
how often abut what subjects, what messages (and information like urls) go via 
the conference-linked chats,  get exchanged in which context with whom and with 
what other companies. 

Add to that the great ability to automatically record what is spoken, use the 
great feature of automatically transcribing everything and you have arrived in 
a world which makes look Orwell‘s 1984 a stoneage tale, laughable.

Add to that having become able to store everything for decades, reanalyzing 
stored information with the latest anslysis tools, many AI based, over and over 
again.

Conference managing companies become able to arrive automatically at 
intelligence (better, faster than humans could come up with): no 
self-controlled, self-determined company or organisation, no goverment 
(administration) could have the slightest interest for such a catastrophic 
reality.

This is probably only possible because most companies are run by managers who 
have no clues with respect to IT, being dilettants who enjoy excercising power 
on IT issues believing that that makes them more competent with respect to 
their managing abilities, not realizing how much damage they may cause to the 
companies they run. 

For such managers it is sufficient that managers of other companies do rhe 
same, such that they can proof their professionality. If a problem shows up, it 
is not their individual fault, individual responsibility, but an „unforseeable“ 
 unfortunate event the entire industry faces. 

Just witness how IT-dilettant managers (in the 21st century!) take decisions 
against mainframes and infrastructures without being able to assess the impact 
cost-wise and organisation-wise. Just read about many of the wrong going 
migration attempts. 

Being able to operate a smartphone or pad does not make people, managers IT 
experts although many feel that to be the case. :)

Rant off.

Use non-surveilled conference software for your needs. Try with your 
(professional) friends or family something like the Jitsi conference software.

Try it out, go to https://meet.jit.si enter some string and share the resulting 
url and everyone is able to immediately join a meeting/conference.

It takes 10 seconds to set up plus a sms, message or email with the Jitsi link 
to join.

I do this with all meetings I control, with friends, colleagues, with students, 
with family (scattered literally over the goibe).

You as IT professionals should have tried Jitsi at least once! :)

Lookup Wikipedia about Jitsi or BigBlue Button and then reason why any 
management of a company with an IT department would use commercial and 
expensive conference companies when they can set up a fully and self-controlled 
conference system for free!

Jitsi and BigBlueButton are open-source, maintained, stable, powerful and best: 
totally transparent, not surveilled and free.

Try it out, go to: https://meet.jit.si and create your first self-controlled 
meeting in ten seconds! :)

—-rony

Rony G. Flatscher (mobil/e)

> Am 08.02.2023 um 19:55 schrieb Tony Harminc :
> 
> On Wed, 8 Feb 2023 at 13:34, Steve Thompson  wrote:
>> 
>> Kind of a rant, but more making a point.
>> 
>> Teams via browser means you have to have an M/S account because
>> your data is in someone else's data center (isn't that a Cloud?
>> ;-) ). Or to put this another way, someone has to have an account
>> so that you can get access via Teams in my experience.
> 
> You don't have to have an MS account to be a guest at a Teams meeting.
> To be sure I just now tried this myself using Firefox, and joined a
> Teams meeting I hosted using my work Teams account. It worked fine.
> The host may have rules that prohibit you from joining anonymously,
> and as always Microsft has all kinds of dark patterns to "encourage"
> you to hand over as much information as they can extract from you, but
> basically it works.
> 
> None of these services MS Teams, Google Meets, Zoom, or any of the
> second tier ones offer anonymity or true end-to-end encryption. All of
> them will collect as much personal data about you as they possibly
> can.
> 
> If you want a good degree of privacy on an audio/video call, use
> Signal. For that matter use Signal anyway. Yes you have to install an
> app, but it's open source and run by a charitable foundation rather
> than a for-profit company.
> 
> Tony H.
> 
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Now available for s390x: [rexxla-members] Announcing the Release of ooRexx 5.0.0

2023-02-03 Thread Rony G. Flatscher

ooRexx 5.0.0 has gone GA (general available) at Christmas.

Enclosed please find the announcment FYI, now that a s390x version has become available, such that 
this group can take advantage of it immediately on the mainframe.


As ooRexx 5.0.0 [1] is available for all important operating systems (Windows, MacOS, various 
Linuxes) it is possible to not only deploy it on s390x, but on your own computer, develop there and 
transfer your [oo]Rexx programs to s390x if desired.


---

Also please note that the ooRexx-Java bridge BSF4ooRexx850 [2] - an external function and class 
library for ooRexx - contains support for s390x (besides Windows, MacOS, various Linuxes) right out 
of the box. Clear the installation zip file's block attribute [1] and then just unzip the 
installation package change into BSF4ooRexx850/install/your_op_sys and run the install script. This 
way you gain direct access all Java class libraries that are installed on the target computer, 
becoming able to address/exploit them with the easy ooRexx syntax without any knowledge of Java 
syntax at all.


The combination of both, ooRexx 5.0 and BSF4ooRexx850, is hardly beatable in the functionality that 
get brought right to the fingers of Rexx programmers. On all major platforms. On mainframes you will 
become able to take advantage of mainframe specific Java classes - like IBM's - which may be a very 
attractive and efficient combo for creating ooRexx scripts as utilitites, as applications or as 
analysis tools.


At least you should check out this combo applying/exploiting your REXX skills. Personal experiences 
and personal insights beat any hear-say! :)


If there are any questions please do not hesitate and ask!

---rony

[1] Note: before installing or unzipping packages downloaded from the Internet on Windows or MacOS 
make sure that the "block" attribute gets cleared on the downloaded files.  Otherwise all unzipped 
and/or installed files get blocked as well, rendering installations useless.

[2] BSF4ooRexx850: 
<https://sourceforge.net/projects/bsf4oorexx/files/beta/20221004/>

P.S.: After installing ooRexx 5.0.0 you may want to look into the samples directory and check out 
the samples, including the native API C and C++ samples that demonstrate how easy it is to create 
external Rexx function packages for ooRexx in C and C++ on your own.


P.P.S.: After installing BSF4ooRexx850 [1] you may want to look up the numerous small examples that 
demonstrate how to take advantage of the Java runtime environment, how one can address Java classes 
and Java objects as if they were Rexx classes and objects. Point your browser to the index.html file 
and you'll get a brief listing of the samples and their purpose.



 Forwarded Message 
Subject:[rexxla-members] Announcing the Release of ooRexx 5.0.0
Date:   Sat, 24 Dec 2022 00:02:43 +0100
From:   Rony 
To: rexxla-memb...@groups.io




*Von:* "Rony G. Flatscher" 
*Datum:* 23. Dezember 2022 um 23:59:49 MEZ
*An:* RexxLA Members mailing list , 
oorexx-annou...@lists.sourceforge.net, Open Object Rexx Developer Mailing List 
, BSF4ooRexx Developer Mailing List 
, bsf4oorexx-supp...@lists.sourceforge.net

*Betreff:* *[rexxla-members] Announcing the Release of ooRexx 5.0.0*


The ooRexx (open object Rexx) team is pleased to release ooRexx 5.0.0 and make it generally 
available to the world via the web from 
<https://sourceforge.net/projects/oorexx/files/oorexx/5.0.0/>.


ooRexx is the object-oriented successor to IBM's famous Rexx language which remains easy to learn, 
easy to program in and easy to maintain, thanks to keeping up the "human centric" design 
principle. The "Rexx Language Association (RexxLA)" <https://www.rexxla.org/> is the owner of the 
source code, originally donated by IBM in 2004 and improved considerably and continuously since then.



Rexx programs can be run unchanged with ooRexx 5.0.0 and can be gradually augmented with the many 
beneficial new features ooRexx 5.0.0 brings to the table, like redirectable commands from and into 
running Rexx programs, new and helpful classes like the RexxInfo class, new ability to annotate 
programs (packages), routines, classes, methods and attributes, ability to easily define multiline 
strings (e.g. for SQL statements, boiler plate text, base64 encoded binary data ...) and many more.


Among the notable improvements are numerous bug fixes compared to its predecessor ooRexx 4.2.0, 
noticeable speed improvements over ooRexx 4.2.0 and much more useful functionality. Please consult 
the file docs/CHANGES.txt for more information.


After downloading ooRexx 5.0.0 and installing take a look into the samples directory which 
contains programs that demonstrate some of its capabilities. The Windows version has numerous 
examples that demonstrate how to interact with Microsoft Office, Apache Open Office/LibreOffice 
and many of the Windows infrastructures ta

Re: AW: SPF/SE is available for free

2022-11-21 Thread Rony G. Flatscher

On 20.11.2022 22:35, Bob Bridges wrote:

I haven't been keeping up with this thread, but I drop in on the random 
long-running thread just because, and I see this.  For ooREXX and VBS and the 
like I've been trying out Notepad++, but I'm not entirely happy with it.


You could use IntelliJ [1] (they have a free community edition) which is available for any operating 
system platform that runs Java. There is an IntelliJ ooRexx-Plugin [2] that supports ooRexx up to 
the latest version 5.0 and the experimental executor edition of ooRexx. The plugin will syntax check 
your Rexx code (you'll get redlines at the right border to navigate to the sections that contain 
errors, together with an explanation of the error) and also supports the few additional mainframe 
Rexx characters (an option you need to activate as these characters did not get into TRL2).



There are a few functions (like the missing  that I don't care for, and 
it's pretty troublesome to find or set the colors the way I'd like them.  I'm open to 
recommendations.  Never heard of Hessling.  I'd probably use the PC version of ISPF 
Editor, but I hear it's not around any more.

THE ("the Hessling editor") can be found here: 


The author, a very nice Australian gentleman named Mark Hessling is also the maintainer of the 
open-source Regina Rexx interpreter of which there was an experimental port to Hercules.


Mark is an astounding man having witnessed his initiatives, tools, products and skills for decades 
(just look at the depth of his knowledge over all the Regina and Rexx external function packages 
support for different operating systems). E.g. he created the Rexx/SQL function package at a time 
(literally decades ago) where the big guys like IBM or Oracle did not support interaction with each 
other's RDBMS, but you could (and can) use Rexx/SQL to do that and connect to different RDBMS at the 
same time. Or look at his long standing Rexx/CURL external function package and the like!


If you look around the above web page you might find additional interesting and valuable Rexx 
related information. Also, you would be able to meet with him in person via the RexxLA mailing lists 
by enrolling to RexxLA for free at  (to fight 
robots there is a funny little challenge which mandates knowledge of Rexx). Also you would be able 
to communicate via the RexxLA mailing lists with the father of Rexx, Mike F. Cowlishaw, or "Mr. 
ooRexx", Rick McGuire, and many more Rexx afficionados... :)


---rony

[1] IntelliJ (quite popular development environment): 

[2] IntelliJ ooRexx-plugin: 





/* When a man is getting better he understands more and more clearly the evil 
that is still left in him.  When a man is getting worse, he understands his own 
badness less and less.  A moderately bad man knows he is not very good; a 
thoroughly bad man thinks he is all right.  This is common sense, really.  You 
understand sleep when you are awake, not while you are sleeping.  You can see 
mistakes in arithmetic when your mind is working properly; while you are making 
them you cannot see them.  You can understand the nature of drunkenness when 
you are sober, not when you are drunk.  Good people know about both good and 
evil; bad people do not know about either.  -C S Lewis, _Christian Behavior_ */


-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of W 
Mainframe
Sent: Sunday, November 20, 2022 06:40

The SPF/SE is an excellent editor, indeed...I use another eccellent editor, 
always free, The Hessling Editor, a Xedit clone with full macro support using 
Rexx.
Dan



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Ad 33rd Rexx Language Symposium coming up next week (September 12th - September 14th 2022)

2022-09-13 Thread Rony G. Flatscher

Hi Hobart,

On 13.09.2022 01:24, Hobart Spitz wrote:

I hope this reaches you in time for a response.

Unfortunately, it was a little bit too late.

According to my reading of the Symposium schedule, registration should be
starting now.  I don't see an active link for even the "General Meeting."
If I've mis-read or there was a technical issue, please let me know how to
adjust my plans for CDT, Dallas.  As of this writing it is 18:33.


The symposium page at <https://www.rexxla.org/events/schedule.rsp?year=2022> displays the times 
according to the local timezone settings of your browser. The times were set to favor the US based 
Rexx programmers this year.


The symposium starts each day at (please double-check):

   CEST 7:00PM (e.g. Vienna, Austria, Europe) which should be
   BST 6:00PM (e.g. London, Great Britain, Europe) which should be
   EDT 1:00PM (e.g. New York) which should be
   CDT 12:00PM (e.g. Dallas)  which should be
   PDT 10:00AM (e.g. Los Angeles)

The link gets send via the RexxLA e-Mail list or can be directly clicked at the top of the symposium 
page if you are logged in.


Hope to see you at the symposium today!

HTH

---rony



On Wed, Sep 7, 2022 at 4:48 AM Rony G. Flatscher
wrote:


This year's International Rexx Language symposium takes place digitally
(via Zoom) next week from
Monday, September 12th, to Wednesday, September 14th.

This year the presentations are scheduled to fit the US American time-zone
the best. Here the
easiest way to get there: go to<https://www.rexxla.org/>  then click the
button entitled "2022
Schedule" on the upper right hand corner.

Note: the presentation schedule times are given in the timezone your
browser reports, so they are
displayed in your own local time-zone.

One remark ad those who work in Java here and wish to be able to implement
Rexx command handlers in
Java (or NetRexx for that matter): there are two presentations that
explain and showcase how to
implement Rexx exit handler and Rexx command handlers in Java. You will
see that it is fairly
straight-forward to implement Rexx handlers in Java, allowing one to add
new command handlers (but
also replace existing command handlers by new implementations).

And the symposium is *the* opportunity to ask questions in person to all
the presenters e.g. to Mark
Hessling (Regina) and anyone else there.

---rony





--
--

__________

Prof. Dr. Rony G. Flatscher
Department Wirtschaftsinformatik und Operations Management
Institut für Wirtschaftsinformatik und Gesellschaft
D2c 2.086
WU Wien
Welthandelsplatz 1
A-1020  Wien/Vienna, Austria/Europe

http://www.wu.ac.at

__

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email tolists...@listserv.ua.edu  with the message: INFO IBM-MAIN


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Ad 33rd Rexx Language Symposium coming up next week (September 12th - September 14th 2022)

2022-09-07 Thread Rony G. Flatscher
This year's International Rexx Language symposium takes place digitally (via Zoom) next week from 
Monday, September 12th, to Wednesday, September 14th.


This year the presentations are scheduled to fit the US American time-zone the best. Here the 
easiest way to get there: go to <https://www.rexxla.org/> then click the button entitled "2022 
Schedule" on the upper right hand corner.


Note: the presentation schedule times are given in the timezone your browser reports, so they are 
displayed in your own local time-zone.


One remark ad those who work in Java here and wish to be able to implement Rexx command handlers in 
Java (or NetRexx for that matter): there are two presentations that explain and showcase how to 
implement Rexx exit handler and Rexx command handlers in Java. You will see that it is fairly 
straight-forward to implement Rexx handlers in Java, allowing one to add new command handlers (but 
also replace existing command handlers by new implementations).


And the symposium is *the* opportunity to ask questions in person to all the presenters e.g. to Mark 
Hessling (Regina) and anyone else there.


---rony





--
--
__

Prof. Dr. Rony G. Flatscher
Department Wirtschaftsinformatik und Operations Management
Institut für Wirtschaftsinformatik und Gesellschaft
D2c 2.086
WU Wien
Welthandelsplatz 1
A-1020  Wien/Vienna, Austria/Europe

http://www.wu.ac.at
__

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Side note ad RexxLA and the upcoming International Rexx Language Symposium

2022-08-03 Thread Rony G. Flatscher
As you may know for decades there is the non-profif SIG "Rexx Language Association (RexxLA)" that 
maintains Rexx and Rexx related technologies, among them (in alphabetic order) NetRexx, Regina, ooRexx.


A short while ago RexxLA has changed their membership model such that interested persons can enroll 
without having to pay any dues (cf. <https://www.RexxLA.org>, button "JOIN FOR FREE") anymore (but 
are free to donate to help fund maintaining the necessary Internet infrastructure). The membership 
is of course very Rexx-savvy, constructive and very helpful. Among the membership one can find e.g. 
Mike F. Cowlishaw, the father of REXX, a very nice, extremely knowledgeable, always constructive 
gentleman! RexxLA runs a membership e-mail list which is of low volume but of high quality. There is 
probably no Rexx-related question that could not be answered by quite a few experts there, many 
times even by the authors of these very technologies themselves.


One very interesting and helpful event that RexxLA organizes is the yearly "International Rexx 
Language Symposium", this year it will be for the 33rd (!) time. Most symposia with their 
presentations are archived there and can be therefore researched and looked-up. This year it will 
take place once more online, between September 12th and September 14th, the planned dates are 
probably favorable for those living in the United States. It used to be the case that there were 
presentations about mainframe REXX related projects, ideas, problem solutions and products in the 
past which are missing nowadays. So if you have something to share about your use of REXX on/with 
the mainframe, about libraries, about problem solutions, techniques and the like, please consider to 
offer a (maybe short) presentation about it for the upcoming Rexx language symposium! Watching this 
e-mail list there are quite a few subjects that appear to be of interest for the REXX community. The 
RexxLA homepage has the upcoming symposium and the call for presentations prominently placed there. 
Here the direct link about the call for presentations: 
<https://www.rexxla.org/document.rsp?base=events=2022=cfp>. It would be great if the 
tradition of mainframe REXX presentations could be revived! :)


---rony


--
--
______

Prof. Dr. Rony G. Flatscher
Department Wirtschaftsinformatik und Operations Management
Institut für Wirtschaftsinformatik und Gesellschaft
D2c 2.086
WU Wien
Welthandelsplatz 1
A-1020  Wien/Vienna, Austria/Europe

http://www.wu.ac.at
__

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Java (Re: Some questions on SYSCALL

2022-07-14 Thread Rony G. Flatscher

Sorry for the late and brief comments (currently a little bit in 
"land-under-water" mode).

On 11.07.2022 10:42, David Crayford wrote:

On 10/07/2022 6:49 pm, Rony wrote:

  Am 09.07.2022 um 03:15 schrieb David Crayford :

On 8/07/2022 7:17 pm, Rony G. Flatscher wrote:

On 07.07.2022 17:45, David Crayford wrote:
On 7/07/2022 7:53 pm, Rony G. Flatscher wrote:

On 06.07.2022 11:03, Seymour J Metz wrote:

... cut ...
There is one ecosystem that beats Perl, Python and practically any others: Java. For every 
problem domain, for new emerging technologies there are Java class libraries which one can 
take advantage of. As Java classes get compiled to intermediate byte code, these Java class 
libraries can be deployed and used immediately on any hardware and any operating system for 
which a Java virtual machine exists.
That's debatable! I'm a full time Java programmer in the last few years and I like. We use 
Spring Boot which is a high quality framework that makes it pleasant to use. I would use SB 
even for a slightly complex command line interface. However, the build systems are a bit 
spotty compared to Node.js, Python etc.

Eclipse, NetBeans, IntelliJ, ...
I build Java in IntelliJ using Maven. Also, we use a DevOps pipeline driven by Jenkins so using 
an IDE is out of the question.




Maven is creaking with it's ugly XML pom.xml and

Beauty lies in the eyes of the beholder ...

Maven is not Java and still an incredible boon!
I agree. I just don't like XML. I would rather use Gradle with it's nice Groovy DSL where I can 
drop down and write code for tricky configurations.




Gradle doesn't work very well on some systems.

What does not work for you?

Would you think that the Java multiplatform build system which is done with Gradle would be 
possible, if that were true what you say?
Gradle doesn't work properly on z/OS. First thing I tried was to nobble spawning the daemon. I 
used AOT -Xshareclasses so start up times were not a problem. However, Gradle was downloading 
lots of unwanted dependencies and filled up the file system cache. I abandoned it and stuck to 
Maven.




C# is a far better language then Java.

Excuse me? 

Off the top of my header.

1. Generics done properly with reflection support, not puny type erasure.
Java retains generics information in byte code (for the compiler) after type erasure (such that 
the runtime does not have to recheck after compilation, after all the compiler checked already).



2. No checked exceptions
One can use no checked exceptions in Java if one wished. OTOH checked exceptions are there and 
one can take advantage of them.


The JRE uses checked exceptions so you can't avoid them. The damage is done. The mess created by 
checked exceptions became more evident when Java 8 introduced Lambda's. There is nothing more ugly 
than a try/catch block in a lambda function. Some people create wrappers but that's just bloat. 
Checked exceptions are widely considered a failed experiment.


This is a very narrow view at the concept of checked exceptions (claiming it to be a "failed 
experiment" is like claiming "coke is a failed experiment", because you prefer water ;) ) and does 
not assess the benefits and misbenefits of exceptions per se, let alone of checked vs. unchecked 
exceptions (there is a good reason why checked exceptions got introduced, such that the compiler can 
detect improper usage of checked exceptions). Having seen quite a lot of Java code exploiting lambda 
functions, I have not really noticed lambda functions that would have to apply a try/catch blocks 
(will from now on look out for it). But even so, if it needs to be stated, so be it, not a problem 
at all.







3. Unsigned integer types

Not really a problem.


It's a problem for our products. We process a lot of unsigned 64-bit integers and perform 
arithmetic such as division and a BigInteger is not acceptable for performance reasons. James 
Gosling admitted that Java didn't implemented unsigned integers as he wanted to keep the language 
simple for new programmers. That's another historical mistake that we are paying the price off. 
Back then Java was designed for very different use cases. Writing cryptographic algorithms in Java 
without an unsigned Long is painful. Gosling's nanny state hand holding hasn't aged well. He 
didn't implement operator overloading because he didn't like the way it was used for iostreams in 
C++. Another BIG mistake that makes the language awkward to use when doing arithmetic on 
BigDecimal, BigInteger types.


BTW, the very existence of Long.divideUnsigned() is proof enough that Java needs unsigned 
integers. In JDK16 they have optimized the function to use an algorithm from Hackers Delight that 
uses twos-complement binary operators. It's a shame we're stuck on JDK8 and the JDK16 code uses an 
unfriendly license for IBM code.


The license is GPL 2 with the classpath exception <https://openjdk.org/legal/gplv2+ce.html>

Re: Java (Re: Some questions on SYSCALL

2022-07-08 Thread Rony G. Flatscher

On 08.07.2022 03:38, David Crayford wrote:

On 7/07/2022 7:53 pm, Rony G. Flatscher wrote:
When I select a language for a job, one of the things that I look at is the ecosystem. I prefer 
ooRexx to Perl, but I find myself using
Perl for some tasks because CPAN is an awesome resource. Python may not be the best language for 
the task at hand, but it pays to check what packages are available.


Indeed Perl and Python have a great wealth of libraries available to them.

There is one ecosystem that beats Perl, Python and practically any others: Java


According to http://www.modulecounts.com/ which shows the number of unique 
packages


Methodology: "... Data is collected /by scraping the relevant websites /once a day via a cron job 
and then stored in a Postgresql database for later retrieval. Growth rates are calculated by 
averaging data over the last week. I'm gathering counts of separate modules, so multiple versions of 
the same module/package/gem only count once (foo-1.2, foo-1.3 and bar-1.0 would count as 2 total).  ..."


Questioning the methodology, completeness, correctness and as a result the relevance. Did not find 
any checkbox for Java there hence wondering where your Java figures come from.



Node.js   2019534
Java       483102
Python  386118
Perl      18354

So the undisputed winner as far as ecosystem is JavaScript. 


This may be more an indication that there are many shortcomings and many packages by different 
authors that try to make the same needed functionalities available.


... cut ...

Ad Java: JRE comes already with a wealth of packages on board that are add-ons 
in other languages.

In addition, almost all important business applications have Java APIs such that one can regard such 
applications as additional Java packages (e.g. OpenOffice/LibreOffice mainly implemented in C++ 
gained Java APIs and the ability to implement modules in Java; one result is the creation of a Java 
scripting framework for OpenOffice/LibreOffice which allows any language for which a javax.script 
implementation exists to be used as a scripting and macro language; one example for this comes with 
BSF4ooRexx).


Or think of the JDBC packages of the different database vendors, or ...

I just downloaded vsam.js to process a VSAM data set in Node on z/OS and it works well. IBM are 
certainly giving

Node more love then REXX which will never officially support VSAM.


Indeed this is strange that IBM does not support REXX the same as other 
technologies.

Has that possibly to do (wild guess) that the developers do not know how to create REXX APIs on the 
mainframe? As probably C++ has a role here, then probably CMake based ooRexx 5 with its C++ APIs 
would make the creation of external ooRexx function libraries quite simple on the mainframe as well 
(judging from the existence of "z/OS XL C/C++ Library Reference SA22-7821" and "z/OS XL C/C++ 
Programming Guide SC09-4765").


But then, if ooRexx and BSF4ooRexx were there (and they are available in the Linux subsystem), then 
one can use ooRexx to exploit com.ibm.jzos.ZFile (there seem to be samples on the Internet that 
demonstrate using it 
<https://www.ibm.com/docs/en/sdk-java-technology/7?topic=SSYKE2_7.0.0/com.ibm.java.zsecurity.api.70.doc/com.ibm.jzos/com/ibm/jzos/sample/vsam/file/package-summary.html>).


---rony


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Java (Re: Some questions on SYSCALL

2022-07-08 Thread Rony G. Flatscher

On 07.07.2022 17:45, David Crayford wrote:

On 7/07/2022 7:53 pm, Rony G. Flatscher wrote:

On 06.07.2022 11:03, Seymour J Metz wrote:

... cut ...


There is one ecosystem that beats Perl, Python and practically any others: Java. For every 
problem domain, for new emerging technologies there are Java class libraries which one can take 
advantage of. As Java classes get compiled to intermediate byte code, these Java class libraries 
can be deployed and used immediately on any hardware and any operating system for which a Java 
virtual machine exists.


That's debatable! I'm a full time Java programmer in the last few years and I like. We use Spring 
Boot which is a high quality framework that makes it pleasant to use. I would use SB even for a 
slightly complex command line interface. However, the build systems are a bit spotty compared to 
Node.js, Python etc. 

Eclipse, NetBeans, IntelliJ, ...

Maven is creaking with it's ugly XML pom.xml and


Beauty lies in the eyes of the beholder ...

Maven is not Java and still an incredible boon!


Gradle doesn't work very well on some systems.


What does not work for you?

Would you think that the Java multiplatform build system which is done with Gradle would be 
possible, if that were true what you say?


C# is a far better language then Java. 


Excuse me? 

When Microsoft lost their lawsuit against Sun about not adhering to the signed Java license 
(remember J#?) which stated among other things that Microsoft was not allowed to create Java classes 
such that they become dependent on the Microsoft operating system (a lock-in strategy and attempting 
to harm Java's "write once, run anywhere" goal), Microsoft started with an alternative to Java and 
eventually came up with .Net/CLR and C# (later F#, VB.Net and the like).


I don't use it because I because I'm not a Windows guy but I look on in envy. 


If you were to do that for no obvious reasons other that you personally "like it", it would be a 
move to get into a Microsoft lock-in without a need.


Java has been the break-free-from-lock-ins alternative for decades. Java allows you to run your 
applications on Windows, but also on MacOS or Linux or ...



Kotlin meets 95% of the requirements but we dismissed it because it's not mainstream so we're 
stuck with Java.


Poor you! ;)
(You got stuck in one of the most up-to-date and maintained languages and environments that sets you 
free from being locked-in in a specific platform.)



I was surprised to notice when I followed Timothy's link to the TIOBE index that C++ is about to 
leapfrog Java. https://www.tiobe.com/tiobe-index/.  The article cites rapid standard rollouts and 
ground breaking new features such as co-routines. As a Lua fan I can't for C++ co-routines. On 
TIOBE Lua has raced back into the top 20 which is due to the surging popularity of gaming 
frameworks such as Roblox.


So you follow the mainstream and when the set of currently reported popular languages changes, you 
change the language because of it and bad-mouth any other language?


You do not choose the language depending on the problem and 
environment/infrastructure at hand to solve?

... cut ...





The Java runtime environment (JRE) already comes with a wealth of professional and tested class 
libraries covering practically all aspects of modern programming, covering everything that any 
modern application may have a need to exploit and interact with.


Yes. But you need to use Open Source libraries for it to be easy to use. The 
JRE doesn't cut it.


Hmm?

The JRE includes a wealth of functionality, a wealth of packages that in other languages are only 
available as add-ons.






Seeing the OpenJDK (open-source Java) community and how vigorously Java gets developed further, 
continually updated in critical areas like security, there is no end in sight for this great 
ecosystem. Witnessing also OpenJDK distributions (from Java 8 LTS to the latest Java 18) from 
IBM, Amazon, SAP, even Microsoft, and many, many more competent and leading IT-related companies, 
the support for Java is unique compared to any other software there is. 


One of the reasons for the surge in C++ is because Java is flabby. 


Flabby? 
ROTFL


It's uses a huge amount of memory and GC is costly in visualized environments. 


That is just not true as many of the other statements. You seem to not really have followed the huge 
work and improvements over the decades and the state.


(Though your statement may be true for C# and .Net/CLR. ;) )

GraalVM is a valiant attempt to solve that problem. 


Nope. The scope is different and interesting (trying to have a common interface standard for 
various, specific languages among them C and C++, which you might faultily take as a weak sign of C 
and C++?).


Anyway, your statements at times seem to be directed ad bad mouthing technologies even if they are 
unsubstantiated, maybe for igniting flames or creating false - emotional - impressio

Re: Java (Re: Some questions on SYSCALL

2022-07-07 Thread Rony G. Flatscher

On 07.07.2022 14:54, Seymour J Metz wrote:

Which of these has Java equivalents?

  use charnames qw(:short);
  use File::Spec;
  use Getopt::Long 2.3203 qw(:config auto_help auto_version);
  use IO::File;
  use Net::DNS;
  use MIME::Parser;
  use MIME::QuotedPrint;
  use MIME::Tools;
  use Regexp::Common qw /net URI/;
  use Regexp::Common::URI::RFC2396 qw /$host $port $path_segments $query/;
  use Socket;
  use URI::Escape;


These are Perl-specific libraries, which is fine of course.

There are Java equivalents for all of them, one would need to research them first before being able 
to put them to work.


An example for "use URI::Escape;": search on the Internet e.g. with "java encode url" and you would 
get many hits, here a few from the top hits:


 * Java tutorial: <https://www.baeldung.com/java-url-encoding-decoding>,
 * Stackoverflow:
   
<https://stackoverflow.com/questions/10786042/java-url-encoding-of-query-string-parameters>
 * the Javadoc (Java documentation) of the respective Java class:
   <https://docs.oracle.com/javase/7/docs/api/java/net/URLEncoder.html>; if you 
wanted the Javadoc
   of a specific Java version, let us say Java 8, then you could use the 
following search string:
   "javadoc 8 urlencoder"

You get the idea, I am sure. This way you are able to fish (research the Java equivalent) for 
yourself and are not dependent on others to fish for you! ;)



Java has the advantage of always being there, at least for z/OS. JIT doesn't 
hurt.

BSF has been available for a long time; why doesn't every Rexx programmer know 
about it and PCRE? Thanks for putting in the work.


You are welcome!

---rony




From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Rony G. Flatscher [rony.flatsc...@wu.ac.at]
Sent: Thursday, July 7, 2022 7:53 AM
To:IBM-MAIN@LISTSERV.UA.EDU
Subject: Java (Re: Some questions on SYSCALL

On 06.07.2022 11:03, Seymour J Metz wrote:

When I select a language for a job, one of the things that I look at is the 
ecosystem. I prefer ooRexx to Perl, but I find myself using
Perl for some tasks because CPAN is an awesome resource. Python may not be the 
best language for the task at hand, but it pays to check what packages are 
available.

Indeed Perl and Python have a great wealth of libraries available to them.

There is one ecosystem that beats Perl, Python and practically any others: 
Java. For every problem
domain, for new emerging technologies there are Java class libraries which one 
can take advantage
of. As Java classes get compiled to intermediate byte code, these Java class 
libraries can be
deployed and used immediately on any hardware and any operating system for 
which a Java virtual
machine exists.

The Java runtime environment (JRE) already comes with a wealth of professional 
and tested class
libraries covering practically all aspects of modern programming, covering 
everything that any
modern application may have a need to exploit and interact with.

Seeing the OpenJDK (open-source Java) community and how vigorously Java gets 
developed further,
continually updated in critical areas like security, there is no end in sight 
for this great
ecosystem. Witnessing also OpenJDK distributions (from Java 8 LTS to the latest 
Java 18) from IBM,
Amazon, SAP, even Microsoft, and many, many more competent and leading 
IT-related companies, the
support for Java is unique compared to any other software there is.

There is no other language and there is no other software infrastructure that 
can possibly beat Java
in this regard.

Therefore it is a good idea to use Java strategically in software projects.

Having said all that, you may see the motivation why I wrote an ooRexx [1] 
function/class library
that bridges ooRexx and Java, which is called BSF4ooRexx [2]. This ooRexx-Java 
bridge has two main
applications:

   * Allow ooRexx programmers to use Java classes and Java objects as if they 
were ooRexx classes and
 ooRexx objects to which one can send ooRexx messages and the Java objects 
will understand them
 conceptually. Here a small ooRexx example that demonstrates how to use the 
Java class
 "java.awt.Dimension" as if it was an ooRexx class:

 /* Java class, 
cf.<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.oracle.com%2Fjavase%2F8%2Fdocs%2Fapi%2Fjava%2Fawt%2FDimension.htmldata=05%7C01%7Csmetz3%40gmu.edu%7C3c202325a69b418f044508da600f6e1f%7C9e857255df574c47a0c00546460380cb%7C0%7C0%7C637927916636331741%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=0Etc155I%2FyB6VDmsHqh%2FTkMftp4RSjkD3mttR9Ix%2BgQ%3Dreserved=0>
  */
 dim=.bsf~new("java.awt.Dimension", 111, 222)
 say "1)" dim~toString   /* every Java object understands "toString"  */

 dim~setSize(555,222)/* chang

Java (Re: Some questions on SYSCALL

2022-07-07 Thread Rony G. Flatscher

On 06.07.2022 11:03, Seymour J Metz wrote:

When I select a language for a job, one of the things that I look at is the 
ecosystem. I prefer ooRexx to Perl, but I find myself using
Perl for some tasks because CPAN is an awesome resource. Python may not be the 
best language for the task at hand, but it pays to check what packages are 
available.


Indeed Perl and Python have a great wealth of libraries available to them.

There is one ecosystem that beats Perl, Python and practically any others: Java. For every problem 
domain, for new emerging technologies there are Java class libraries which one can take advantage 
of. As Java classes get compiled to intermediate byte code, these Java class libraries can be 
deployed and used immediately on any hardware and any operating system for which a Java virtual 
machine exists.


The Java runtime environment (JRE) already comes with a wealth of professional and tested class 
libraries covering practically all aspects of modern programming, covering everything that any 
modern application may have a need to exploit and interact with.


Seeing the OpenJDK (open-source Java) community and how vigorously Java gets developed further, 
continually updated in critical areas like security, there is no end in sight for this great 
ecosystem. Witnessing also OpenJDK distributions (from Java 8 LTS to the latest Java 18) from IBM, 
Amazon, SAP, even Microsoft, and many, many more competent and leading IT-related companies, the 
support for Java is unique compared to any other software there is.


There is no other language and there is no other software infrastructure that can possibly beat Java 
in this regard.


Therefore it is a good idea to use Java strategically in software projects.

Having said all that, you may see the motivation why I wrote an ooRexx [1] function/class library 
that bridges ooRexx and Java, which is called BSF4ooRexx [2]. This ooRexx-Java bridge has two main 
applications:


 * Allow ooRexx programmers to use Java classes and Java objects as if they 
were ooRexx classes and
   ooRexx objects to which one can send ooRexx messages and the Java objects 
will understand them
   conceptually. Here a small ooRexx example that demonstrates how to use the 
Java class
   "java.awt.Dimension" as if it was an ooRexx class:

   /* Java class, cf. 
 */
   dim=.bsf~new("java.awt.Dimension", 111, 222)
   say "1)" dim~toString   /* every Java object understands "toString"  */

   dim~setSize(555,222)    /* change width Java-like    */
   say "2)" dim~toString

   dim~width=999   /* change width ooRexx-like (attribute)  */
   say "3)" dim~toString

   ::requires BSF.CLS  /* get ooRexx-Java bridge    */

   Running the above ooRexx program yields:

   1) java.awt.Dimension[width=111,height=222]
   2) java.awt.Dimension[width=555,height=222]
   3) java.awt.Dimension[width=999,height=222]


 * Allow Java programmers to easily run ooRexx scripts/macros, with the 
possibility to even supply
   arguments that may be even Java objects with which the ooRexx program can 
readily interact with.
   Here a small Java example that demonstrates how to run an ooRexx script from 
Java using the
   standard Java scripting framework (cf.
   
):

   import javax.script.*;

   public class TestRunRexx
   {
    public static void main (String args[])
    {
    String rexxCode = "say 'Hello, world, this is Rexx speaking ...' 
\n" +
  "say 'It is:' .dateTime~new  
" ;
    ScriptEngineManager manager = new ScriptEngineManager();
    ScriptEngine se = manager.getEngineByName("rexx");
    System.out.println("about to execute the Rexx program from 
Java...");
    try
    {
    se.eval(rexxCode);
    }
    catch (Throwable t)
    {
    System.err.println(t);
    System.exit(1);
    }
    System.out.println("about to end Java.");
    System.exit(0);
    }
   }

   Compiling the above Java program with "javac TestRunRexx.java" and running it 
with "java
   TestRunRexx" yields:

   about to execute the Rexx program from Java...
   REXXout>Hello, world, this is Rexx speaking ...
   REXXout>It is: 2022-07-07T13:43:42.67
   about to end Java.

---

So my advice would be, if you use ooRexx and have a need for functionality that is not available: 
install the ooRexx-Java bridge BSF4ooRexx and from that moment on you have access to *all* Java 
class libraries on *all* operating systems: this makes a wealth of libraries immediatley available 
to 

Re: Ad importance of the message paradigm (Re: Secure sockets (Re: Some questions on SYSCALL

2022-07-03 Thread Rony G. Flatscher
 GUI thread, even if they knew about techniques how to achieve that, they 
would get into problems when using larger programs with complex interaction patterns (which thread 
is being used, if one would interact with object x versus object y). In the end I came up with a 
solution for them that solved all GUI-thread problems once and forever since then and became part of 
BSF4ooRexx: the easy solution is message based! :)


---rony



-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Rony G. Flatscher
Sent: Saturday, July 2, 2022 15:05

Alan Kay is regarded to have coined the term "object-oriented programming 
(OOP)" in the context of his work while at PARC. He is being cited on Wikipedia:

 I'm sorry that I long ago coined the term "objects" for this topic because 
it gets many people
 to focus on the lesser idea. The big idea is "messaging".[8]

Cf.<https://en.wikipedia.org/wiki/Alan_Kay#cite_ref-8>.



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Ad importance of the message paradigm (Re: Secure sockets (Re: Some questions on SYSCALL

2022-07-02 Thread Rony G. Flatscher
Alan Kay is regarded to have coined the term "object-oriented programming (OOP)" in the context of 
his work while at PARC. He is being cited on Wikipedia:


   I'm sorry that I long ago coined the term "objects" for this topic because 
it gets many people
   to focus on the lesser idea. The big idea is "messaging".[8]

Cf. <https://en.wikipedia.org/wiki/Alan_Kay#cite_ref-8>.

---rony


On 02.07.2022 20:55, Rony G. Flatscher wrote:

On 02.07.2022 02:20, David Crayford wrote:

Thanks Rony. I really enjoyed reading that paper.

+1

Do you know why the tilde character was chosen as the message passing operator? 
It's quite unusual.


Rick McGuire told me once that they were looking for a key that was not widely used and spotted 
the tilde/twiddle.


---rony

P.S.: It may also be seen by others as a somewhat iconic symbol representing the message 
flying/flapping to the object/receiver on the left hand side of the twiddle.





On 30/06/2022 6:55 pm, Rony G. Flatscher wrote:

On 30.06.2022 00:52, David Crayford wrote:

On 30/06/2022 6:37 am, Farley, Peter x23353 wrote:

Gentle listers,

Can we all agree to let this discussion be resolved by agreeing to the Perl mongers motto, 
TMTOWTD

TWTOWTD? Or maybe not. Show me how to create a secure socket in REXX without 
using PAGENT.


You may want to check out the slides in 
<https://wi.wu.ac.at/rgf/wu/lehre/slides/BusinessProgramming/230_AutoJava_Sockets_V03.pdf> for a 
simple solution with ooRexx.


---rony

P.S.: The above slides were used to teach non-programmers from the university's administration 
who were interested to learn/see the concepts of programming. They were able to come up with 
homework excercises exploiting secure sockets on their own. 


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Secure sockets (Re: Some questions on SYSCALL

2022-07-02 Thread Rony G. Flatscher

On 02.07.2022 02:20, David Crayford wrote:

Thanks Rony. I really enjoyed reading that paper.

+1

Do you know why the tilde character was chosen as the message passing operator? 
It's quite unusual.


Rick McGuire told me once that they were looking for a key that was not widely used and spotted the 
tilde/twiddle.


---rony

P.S.: It may also be seen by others as a somewhat iconic symbol representing the message 
flying/flapping to the object/receiver on the left hand side of the twiddle.





On 30/06/2022 6:55 pm, Rony G. Flatscher wrote:

On 30.06.2022 00:52, David Crayford wrote:

On 30/06/2022 6:37 am, Farley, Peter x23353 wrote:

Gentle listers,

Can we all agree to let this discussion be resolved by agreeing to the Perl 
mongers motto, TMTOWTD

TWTOWTD? Or maybe not. Show me how to create a secure socket in REXX without 
using PAGENT.


You may want to check out the slides in 
<https://wi.wu.ac.at/rgf/wu/lehre/slides/BusinessProgramming/230_AutoJava_Sockets_V03.pdf> for a 
simple solution with ooRexx.


---rony

P.S.: The above slides were used to teach non-programmers from the university's administration 
who were interested to learn/see the concepts of programming. They were able to come up with 
homework excercises exploiting secure sockets on their own. 


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


PDFBox (Re: REXX outside TSO

2022-06-30 Thread Rony G. Flatscher
At  you could select the keyword "PDFBox" to get at the 
Bachelor thesis of Cristina Dobrea who had created nutshell examples in ooRexx to demonstrate how to 
use that library to create and manipulate PDF files.


"PDFBox" is an open-source Java library from the Apache software foundation (ASF) and allows for 
creating and manipulating PDF files, cf. . As it is a Java library it 
can be directly used on all operating systems that have the Java runtime environment (JRE) or Java 
development kit (JDK) present (no need to port the library explicitly to different hardware and 
software architectures by virtue of Java).


The PDFBox Bachelor thesis used ooRexx originally with PDFBox 1.x which got succeeded by PDFBox 2.x 
with a new and incompatible set of APIs, such that I had to update the nutshell examples accordingly 
(the reason why there are two zip archives present).


Currently there is a new Bachelor thesis in the works that exploits the new PDFBox 3.x alpha. Once 
the thesis got approved it will probably also be placed on the URL above together with zip archives 
of the new nutshell examples (like signing PDF files).


As you can see it is straight-forward to use PDFBox right from ooRexx as if PDFBox was implemented 
in ooRexx and not in Java. :)


---rony


On 29.06.2022 18:00, Bob Bridges wrote:

For what it's worth, I've had that need.  Only twice, I admit:

1) At one employer I overheard my boss talking on the phone; apparently they'd 
been tracking viri by looking at firewall logs and analyzing connections that 
had been refused.  (A machine that sends 10 000 packets to one IP address is 
probably fine; one that sends 1 packet to each of 10 000 IP addresses is a 
virus looking for more victims.)  But they were doing it by loading 2MB or so 
of firewall logs into Excel, then sorting and culling and parsing; it took them 
a couple of hours to do it each time.  I downloaded Regina REXX onto my machine 
at work and spent that amount of time writing a REXX that read the raw firewall 
extract and created a CSV in about 20 seconds.  REXX makes ~very~ short work of 
parsing.  At the time I don’t think I knew VBScript, but it surely would have 
been harder.

2) A developer I know asked me to work out a way to turn his plain-text error 
messages into a decent format for user documentation, in PDF.  We worked out a 
plan where I'd turn his plain text into RTF, then get Word to read the RDF and 
write it out as PDF.  (I don't know anything about PDF, you see.  I didn't know 
anything to speak of about RTF, either, but I found the specs on-line and 
learned.)  I tried doing that in VBS or VBA, but the parsing just got too hard. 
 That’s when I broke down and got myself a copy of ooREXX, which I had lusted 
after ever since I heard about it but never had an excuse.

Turns out ooREXX has a lot of capabilities that I had to study up on before I 
could use it effectively, so I took a day or two off to read and play.  But it 
works now.

Again, I see REXX's most valuable strength as parsing strings.  Occasionally 
that strength is valuable outside TSO.

---
Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313

/* A man who carries a cat by the tail learns something that can be learned in 
no other way.  -Mark Twain */

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
David Crayford
Sent: Wednesday, June 29, 2022 11:27

I just can't see any use for REXX outside of TSO/ISPF.


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Scopes, environments (Re: Some questions on SYSCALL

2022-06-30 Thread Rony G. Flatscher

On 30.06.2022 01:28, David Crayford wrote:

On 30/06/2022 5:33 am, Paul Gilmartin wrote:

On Wed, 29 Jun 2022 22:22:39 +0200, Bernd Oppolzer wrote:

This is an old OS/2 REXX program (from the 1990s, IIRC),
used to traverse a directory tree recursively and issue a command in
every subdirectory found:

... with local variables protected by "procedure".


Protected? That's a good one! Another reason to hate on REXX is the lack of lexical scoping. It's 
ok for small programs but as soon as you start to scale
it's a nightmare when you"i" loop counter gets clobbered in a subroutine. "procedure" helps but 
then you have to use "expose" which normally results in

using a compound global variable such as g._namespace. REXX is a language that 
you program into.


In classic REXX there is no means to fetch stems by reference, therefore the need to be able to 
EXPOSE stems in internal routines which create a local scope using the PROCEDURE keyword.


ooRexx alleviates this need as it allows for fetching stems in internal routines/procedures using 
e.g. "USE ARG mystem." instead of "PARSE ARG" which only works on string values and therefore cannot 
fetch a stem by reference.


Having ooRexx available you immediately gain additional scopes and great new abilities. One being 
that one can define routines having their own scope (and the ability to make them directly available 
to other Rexx programs just by adding the PUBLIC option to the routine directive's name).


Another cool feature that can help simplify certain kinds of problems is the notion of "runtime 
environments" in ooRexx:


 * ooRexx package environment: in ooRexx a "package" is a file that contains 
Rexx code with
   routines that may or may not be public, classes (types, structures) that may 
or may not be
   public, method routines that may or may not be assigned to classes and much 
more. In addition a
   programmer can use the package local environment to store values that can be 
retrieved from
   anywhere within that package.

 * ooRexx local environment: ooRexx' implementation can be characterized to be 
incredibly powerful.
   Among other things one can create arbitrary many *different* ooRexx 
interpreters within the same
   process if need be. Each such ooRexx interpreter instance has its own copy 
of the ooRexx local
   environment which provides the instance's stdin, stdout, stderr, 
traceoutput, debuginput, stdque
   streams/monitors. This way each ooRexx interpreter instance will have 
separated such
   streams/monitors.

 * ooRexx global environment: this environment contains all entries that are 
meant to be globally
   available to each Rexx program in each ooRexx interpreter instance like the 
ooRexx supplied classes.

All these environment are ooRexx directories and used by the ooRexx interpreter at runtime to locate 
entries for environment symbols. An "environment symbol" is a Rexx symbol that starts with a dot 
like ".directory". The ooRexx interpreter will remove the dot and lookup the above environment 
directories in the given order to locate an entry "DIRECTORY" and will return it, once found. (If no 
entry could be found in these environments then the lookup will result in the environment symbol 
itself, i.e. the uppercased string value of the environment symbol, e.g. '.no.entry' would yield 
'.NO.ENTRY').


The dynamic nature of REXX has been carried over to ooRexx and enhanced considerably. However one 
would just exploit that power if need be.


---rony


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Secure sockets (Re: Some questions on SYSCALL

2022-06-30 Thread Rony G. Flatscher

On 30.06.2022 00:52, David Crayford wrote:

On 30/06/2022 6:37 am, Farley, Peter x23353 wrote:

Gentle listers,

Can we all agree to let this discussion be resolved by agreeing to the Perl 
mongers motto, TMTOWTD

TWTOWTD? Or maybe not. Show me how to create a secure socket in REXX without 
using PAGENT.


You may want to check out the slides in 
 for a 
simple solution with ooRexx.


---rony

P.S.: The above slides were used to teach non-programmers from the university's administration who 
were interested to learn/see the concepts of programming. They were able to come up with homework 
excercises exploiting secure sockets on their own.


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Listing of files (Re: Some questions on SYSCALL

2022-06-30 Thread Rony G. Flatscher

On 29.06.2022 23:24, David Crayford wrote:

On 30/06/2022 4:22 am, Bernd Oppolzer wrote:



This is an old OS/2 REXX program (from the 1990s, IIRC),
used to traverse a directory tree recursively and issue a command in every 
subdirectory found:


/* rexx */

arg command

call RxFuncAdd "SysLoadFuncs", "REXXUTIL", "SysLoadFuncs"
call SysLoadFuncs

dir = directory()
if right(dir,1) = "\" then
   dir = left(dir, length(dir) - 1)

call tree dir, command

x = directory(dir)

exit


tree: procedure

   arg dir, command

   say "*** Verzeichnis in Bearbeitung: "dir" ***"

   x = directory(dir)

   command

   rc = SysFileTree("*.*", verz, "D")
   do i = 1 to verz.0
  dir = word(verz.i, 5)
  call tree dir, command
   end

   return


you may notice the recursive call of the procedure "tree".

I don't see any justification for your REXX bashing;
it's just another flavor of scripting language, which allows to do great things,
once you manage to use it.


Sorry Brend, but I don't consider that snippet to be great! It's a perfect example of flabby, 
verbose REXX code. The only justification for using REXX is that you personally favor the 
language. Python is far more succinct.


|for| |root, dirs, files ||in| |os.walk(path_of_the_directory):|
|||for| |i ||in| |files:|
|||print||(os.path.join(root, i))|


Just having to use those vertical bars to explicate how the Python code has to be formatted 
(indented) in order for it to work correctly is quite distorting.


Also the Python os module is quite extensive and hard to gain and keep an overview of the 
functionality it offers. [1]


---

Here a version of sysFileTree (also available in Regina's regutil package if not mistaken) that 
lists all files in all subdirectories:


   call sysFileTree "*.rex", "files.", "FSO"
   do i=1 to files.0
   say files.i
   end

Simple. REXX.

Here a version using ADDRESS...WITH and the operating system's dir command.

   cmd = "dir *.rex /b /s"
   ADDRESS SYSTEM cmd WITH OUTPUT STEM files.
   do i=1 to files.0
   say files.i
   end

Simple. REXX.

---rony

[1] "os — Miscellaneous operating system interfaces": 


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Syntax checking plugin ... (Re: Some questions on SYSCALL

2022-06-30 Thread Rony G. Flatscher

On 29.06.2022 17:39, Bob Bridges wrote:

My first language was a subset of PL/1, and I still think it's a great 
language, but there doesn't seem to be much call for it at the clients I serve. 
 I didn't know PL/1 programmers indent the END with the paragraph; I thought it 
was just my preference, but maybe I learned it earlier than I thought.

I don't follow what you're saying about ISPF.  If I indent the END, then I can 
use eXclude and Show to reveal the start of code blocks in certain column 
numbers without the END obtruding, which (it seems to me) is just what I would 
want.  Or are you thinking that you can make sure there's an END for each one?  
I guess that would work.

Usually I test a program as I'm developing it, running it in its unfinished 
state every so often to be sure that the parts I've written so far are working 
correctly before going on to the next part.  So, for example, I read the input 
data and table it, and generate a SAY statement to be sure it's parsing the 
input correctly.  Then I delete that SAY and write the next part, with SAY 
statements to convince me it work, and so on.  But occasionally I complete a 
large amount of code, only to have REXX tell me that I'm missing and END 
somewhere.  It's usually not hard to go through the program and check each 
block of code, but yeah, a couple of times a year the problem hides from me for 
15 minutes or so.

I've written stuff in ISPPF, but never long enough for this to be a problem.  
If it needs to be that complex I write an external REXX.


One possibility would be to use the ooRexx plugin [1] for IntelliJ [2] which does syntax checking of 
classic and ooRexx programs (including the Executor derivative).


It will show you any kind of errors with a small red horizontal line at the right hand side. Just 
hover and click on such little red lines  and the plugin will try tell you what kind of error it 
found and will move you to the location of the error upon the click.


It is really a helpful tool. Copying the syntax highlighted [oo]Rexx code to the clipboard will 
allow you preserve the syntax highlighting when pasting it e.g. into a slide or a word processor 
document. Another nice feature of the plugin is automatic generation of Rexx documentation 
("ooRexxDoc"), which will create HTML-rendered documentation.


---rony

[1] IntelliJ [oo]Rexx plugin: 
: pick the latest 
version (currently 2.1.0).


[2] IntelliJ IDEA: : implemented in Java, therefore 
available for all platforms.


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Some questions on SYSCALL

2022-06-29 Thread Rony G. Flatscher

Hi David,

On 29.06.2022 15:54, David Crayford wrote:
I know ooRexx. I ported it to z/OS 10 years ago but it was buggy and slow. 


Hmm, ten years ago? Over time there has been so much improvements in these and other areas including 
a testing framework with quite a comprehensive coverage of the ooRexx interpreter.


There is zero chance of IBM or a vendor wasting resources on REXX today as there is no market for it. 


Hmm, so you speak for IBM? The REXX infrastructure, the REXX experts, the ability to learn REXX (and 
ooRexx for that matter) in a short time, becoming empowered to solve mainframe based problems 
quickly and the like does not constitute a USP (uinque selling proposition on the market)?



Now we have Python on z/OS REXX is very much a legacy language. That's even more pertinent with 
the shift from TSO/ISPF to IDEs.


Hmm, so Python is the end of the world as it solves everything? No other language stands a chance 
anymore?



I could be wrong and I'm willing to be turned. I'm a big fan of Lua which I consider to be the 
most elegant language I know. 


Sure, Lua - like many other languages following different paradigms - is an interesting language, 
but it could not be used to teach Business administration students programming from scratch within 
four months to the extent that in the end they would be able to program Windows, MSO, create 
complex, portable GUIs etc. on their own. It can be done with ooRexx (and the BSF4ooRexx function 
library bridging ooRexx and Java), believe it or not. As a result it is cheaper to learn ooRexx, and 
the problem solving capacity one gains with it quickly is really quite unparalleled.


Having REXX/ooRexx one is able to easily orchestrate and control other software. If need be one can 
bridge REXX/ooRexx easily with specialized software like database management systems (who would 
write one in REXX or Python for that matter) and the like.


In today's world I would deploy Java everywhere and exploit Java class libraries as much as possible 
from other languages, if need be. For the latter to be feasible you need a flexible, dynamical and 
easy to use language which is proven, which can be said of ooRexx with the ooRexx-Java bridge.



It can easily be used to write DSLs for configuration or model development. How do I write a DSL 
in REXX?


Why would I want to? Why not: "How do I write a DSL in C++?"



https://leafo.net/guides/dsl-in-lua.html


REXX is such an easy programming language that one does not need to create yet another language to 
make it usable. ;)


If really needed one could create DSLs with ooRexx  as with any other 
programming language, of course.

---rony




On 29/06/2022 9:41 pm, Rony G. Flatscher wrote:

Hi David,

On 29.06.2022 14:06, David Crayford wrote:

On 29/06/2022 6:37 pm, Seymour J Metz wrote:
Sme, but manageable. The article Safe REXX at <http://www.rexxla.org/Newsletter/9812safe.html> 
and <http://www.rexxla.org/Newsletter/9901safe.html;> has some tips on avoiding REXX pitfalls.


What's the point in managing something when you can just use a better language? It's a good time 
to be working on z/OS as we have an abundance of choice. That's not entirely obvious on this 
forum where every problem seems to be met with a ham-fisted REXX solution.


Yes, Crayford's bashing REXX again. I have some experience of using z/OS UNIX REXX services but 
I didn't find it productive. Maybe somebody with more knowledge than me could post a snippet 
that demonstrates how to recursively traverse a directory tree printing the entries.


The problem is that this is not constructive. Not sure why it is so important for you to bash 
REXX even if it makes you look bad at times.


REXX in the mainframe world (I learned REXX for the first time on a VM/CMS 370 system a few 
decades ago) is of course a great - and unmatched - productivity tool and as a result over the 
decades there has been an incredible amount of useful REXX inventory created.  Best, REXX is easy 
to learn and easy to use like no other language of that power.


If you were to know ooRexx you would realize that porting it to the mainframe would even help 
yourself and everyone else to settle on a few important languages and not being forced to go 
astray with this language for solving this particular problem, that language for solving that 
particular problem, and then suggesting to use yet another language for ...


Porting ooRexx to the mainframe would allow for keeping the existing REXX programs running with 
ooRexx (the design of ooRexx - by demand of IBM's customers - is such that it is compatible with 
classic REXX). Therefore one can use ooRexx to run existing REXX programs and one could use 
ooRexx to create new classic REXX programs.


Only then would one become able to take advantage of the many new ooRexx features like becoming 
able to fetch e.g. stems by reference,  or using ANSI REXX' "address...with" (e.g. redirecting 
input 

Re: Some questions on SYSCALL

2022-06-29 Thread Rony G. Flatscher

Hi David,

On 29.06.2022 14:06, David Crayford wrote:

On 29/06/2022 6:37 pm, Seymour J Metz wrote:
Sme, but manageable. The article Safe REXX at  
and  has some tips on avoiding REXX pitfalls.


What's the point in managing something when you can just use a better language? It's a good time 
to be working on z/OS as we have an abundance of choice. That's not entirely obvious on this forum 
where every problem seems to be met with a ham-fisted REXX solution.


Yes, Crayford's bashing REXX again. I have some experience of using z/OS UNIX REXX services but I 
didn't find it productive. Maybe somebody with more knowledge than me could post a snippet that 
demonstrates how to recursively traverse a directory tree printing the entries.


The problem is that this is not constructive. Not sure why it is so important for you to bash REXX 
even if it makes you look bad at times.


REXX in the mainframe world (I learned REXX for the first time on a VM/CMS 370 system a few decades 
ago) is of course a great - and unmatched - productivity tool and as a result over the decades there 
has been an incredible amount of useful REXX inventory created.  Best, REXX is easy to learn and 
easy to use like no other language of that power.


If you were to know ooRexx you would realize that porting it to the mainframe would even help 
yourself and everyone else to settle on a few important languages and not being forced to go astray 
with this language for solving this particular problem, that language for solving that particular 
problem, and then suggesting to use yet another language for ...


Porting ooRexx to the mainframe would allow for keeping the existing REXX programs running with 
ooRexx (the design of ooRexx - by demand of IBM's customers - is such that it is compatible with 
classic REXX). Therefore one can use ooRexx to run existing REXX programs and one could use ooRexx 
to create new classic REXX programs.


Only then would one become able to take advantage of the many new ooRexx features like becoming able 
to fetch e.g. stems by reference,  or using ANSI REXX' "address...with" (e.g. redirecting input from 
stems or standard and error output to stems), being able to create public Rexx routines (can be 
directly called from another REXX program) and much more.


Doing so would be sensible as it allows for exploiting the already known programming language, its 
environment and existing REXX infrastructure; one would gain new abilities and options from then on.


Also the important property - being able to learn and understand the language quickly - remains 
intact with ooRexx, it just increases the problem solution capacity dramatically by embracing the 
object-oriented paradigm the way it does.


If Business administration students are able to learn ooRexx from scratch in just four months such 
that in the end they have become able to create programs for Windows and Microsoft Office (after 
only two months) and portable (running unchanged on Windows, Linux and MacOS) applications including 
OpenOffice/LibreOffice and even JavaFX (!) GUIs (after another two months, exploiting all of Java 
which gets camouflaged as the dynamically typed, caseless ooRexx, without having to learn a single 
line of Java; one only needs to be able to read and understand the JavaDocs).


So it is feasible and not expensive at all to teach newcomers to program in ooRexx. Putting ooRexx 
into the hands of REXXperts like the ones that can be found here, would be a real and important boon ...


As IBM has been successfully porting quite a few programming languages to the mainframe, it should 
be feasible to port ooRexx as well as ooRexx is purely implemented in C++ (it has in addition a very 
nice and powerful native API to the interpreter) making a modern and powerful incarnation of REXX 
available on the mainframe where REXX was born ...


---rony

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: An ooRexx sample for the Java sample program ... (Re: Some UNIX file usage questions

2022-06-23 Thread Rony G. Flatscher

Hi Andrew,

On 23.06.2022 01:42, Andrew Rowley wrote:

On 22/06/2022 9:44 pm, Rony G. Flatscher wrote:


   /* ... do whatever you need to do, if anything ... */

       /* now wait until the stop event gets received in rexxCallBack */
   rexxCallBack~waitForStop   /* invocation will block */



I don't know ooRexx so I'm working mainly from your comments, but the sample I wrote doesn't do 
something then block waiting for the stop command. It does something (sleep) continually, checking 
regularly to see if the stop command has been received.


Of course, in a real program sleep would be replaced with the actual function 
you wanted to perform.

Ah, I see what you meant!


This is a simple example, there are also more complex ways of interrupting/stopping a thread in 
Java than periodically checking a status.


Sure.

Maybe a few comments what I intended to show followed by an ooRexx version below that does also a 
loop with sleep to match your Java sample conceptually in all aspects.


ooRexx is a language that is multithreaded and makes it easy to kick off (and synchronize) threads 
if need be. I remember one American software engineer who ran a business creating software 
simulations for robotics about 25 years ago who used OS/2 Warp and its contained Object REXX (IBM's 
product which later turned into today's ooRexx) for that purpose back then; he told me at an 
International RexxLA symposium that the reason for him using Object REXX was an experiment he 
undertook to create a simple simulation of an airport where planes would be landing, taking off and 
taxiing, and all would take him only about 120 lines of code.


By default ooRexx supports inter-object multithreading and intra-object multithreading. In addition 
it allows for fine grained control of multithreading with the GUARD ON/OFF [WHEN test of control 
variable[s]] keyword statement.


In this transcription of your Java program I tried to demonstrate synchronizing the Java thread that 
reports the command events with the main (ooRexx) thread. ooRexx will stop (block) in the main 
thread at the statement


   rexxCallBack~waitForStop

until the method handleStop() gets invoked on the MvsCommandCallback thread which will cause 
waitForStop to gain control and return to allow the main thread to continue (which in this case ends 
the program and thereby Java). One could have any number of commands before and after that 
particular synchronization point.


---

As your intention was to use a loop to execute code in intervals repeatedly until the 
MvsCommandCallback reports the handleStop() event by invoking that event method which sets the 
'stopped' attribute to .true/1, here a version that uses such a loop in the main (ooRexx) thread 
which executes as long as the MvsCommandCallback event method handleStop was not invoked (which will 
set the value of the attribute 'stopped' to .true) on the MvsCommandCallback (Java) thread.


Here the (untested) ooRexx program:

   /* load the Java class into ooRexx, it will understand ooRexx messages */
   MvsConsole = bsf.loadClass("com.ibm.jzos.MvsConsole")
   if \MvsConsole~isListening then    /* if not yet a command listener 
thread   */
   MvsConsole~startMvsCommandListener

   rexxCallBack = .CommandCallback~new    /* create a Rexx value of type 
"CommandCallback" */
   /* wrap/box the Rexx value/object as a Java value/object   */
   boxedCallBack = BsfCreateRexxProxy(rexxCallBack, , 
"com.ibm.jzos.MvsCommandCallback")
   MvsConsole~registerMvsCommandCallback(boxedCallBack)

   /* now loop until the stop event gets received in rexxCallBack */
   do while \rexxCallBack~stopped
   call sysSleep 1 /* sleep a second or do something else */
   end

   ::requires "BSF.CLS"   /* get ooRexx-Java bridge  */

   /* ooRexx class defines the Java methods it will serve. Invoking these
   Java methods will cause a message of the same name and same arguments
   to be sent to the ooRexx value/object which will search and invoke
   the appropriate ooRexx method here. */
   ::class CommandCallback    /* implements MvsCommandCallback methods  */
   ::method init  /* runs when a value of this type gets created */
  expose startTime stopped /* access object variables (attributes)*/
  startTime=.DateTime~new  /* remember current date and time  */
  stopped = .false /* set attribute to 0  */

   ::method handleModify
  expose startTime /* access object variable (attribute)  */
  use arg arg0
  if arg0="REPORT" then
 say "Runtime:" .dateTime~new - startTime   /* deduct current date and 
time  */
  else
 say arg0 "not recognized. Valid commands: REPORT"

   ::method handleStart   /* do nothing */

   ::method handleStop
  expose stopped   /* access object variabl

An ooRexx sample for the Java sample program ... (Re: Some UNIX file usage questions

2022-06-22 Thread Rony G. Flatscher

Hi Andrew,

thank you for this Java program. I took the liberty to transform it to ooRexx (untested) which 
should do the same as your Java program:


   /* load the Java class into ooRexx, it will understand ooRexx messages */
   MvsConsole = bsf.loadClass("com.ibm.jzos.MvsConsole")
   if MvsConsole~isListening<>1 then  /* same as .true in ooRexx */
   MvsConsle~startMvsCommandListener

   rexxCallBack = .CommandCallback~new    /* create a Rexx value of type 
"CommandCallback" */
   /* wrap/box the Rexx value/object as a Java value/object */
   boxedCallBack = BsfCreateRexxProxy(rexxCallBack, , 
"com.ibm.jzos.MvsCommandCallback")
   MvsConsole~registerMvsCommandCallback(boxedCallBack)

   /* ... do whatever you need to do, if anything ... */

   /* now wait until the stop event gets received in rexxCallBack */
   rexxCallBack~waitForStop   /* invocation will block */


   ::requires "BSF.CLS"   /* get ooRexx-Java bridge */

   /* ooRexx class defines the Java methods it will serve. Invoking these
   Java methods will cause a message of the same name and same arguments
   to be sent to the ooRexx value/object which will search and invoke
   the appropriate ooRexx method here. */
   ::class CommandCallback    /* implements MvsCommandCallback methods  */
   ::method init  /* runs when a value of this type gets created */
  expose startTime /* access object variable (attribute) */
  startTime=.DateTime~new  /* remember current date and time */

   ::method handleModify
  expose startTime /* access object variable (attribute) */
  parse arg arg0
  if arg0="REPORT" then
 say "Runtime:" startTime - .dateTime~new   /* deduct current date and 
time  */
  else
 say arg0 "not recognized. Valid commands: REPORT"

   ::method handleStart   /* do nothing */

   ::method handleStop
  expose lock  /* access object variable (attribute) */
  lock = .false    /* set lock to 0 */
  return .false    /* return 0 */

   ::method waitForStop   /* method to block caller until stop occurs */
  expose lock  /* access object variable (attribute) */
  guard on when lock=.false/* wait until control variable is set to .false 
*/

A few notes:

- it is not necessary to know Java, one just needs to be able to understand the documentation of the 
Java classes that you wish to use from ooRexx, in this case e.g. 
 and 
. Anyone on this 
list will be able to read the Java documentation of these Java classes and understand what is 
documented there, I am sure;


- the statements that start with two colons (::) are directives to ooRexx; ooRexx will read a 
program, syntax check it, then carry out each directive one by one and at the end will start to 
execute the program with the statement starting at line 1


- the "::requires BSF.CLS" directive will cause ooRexx to call the ooRexx program BSF.CLS which will 
load the Java bridge and camouflage the strictly typed, case sensitive Java as the dynamically typed 
and caseless ooRexx


- the "::class" directive will cause ooRexx to create a class (synonyms: type, structure) and 
remember its name


- the "::method" directives will cause ooRexx to create methods, remember their names and the Rexx 
code going with them and assign those methods to the previously created class


- any Rexx value (synonyms: object, instance) created from this class will understand all messages 
that are named as the methods therein: conceptually, every Rexx value/object/instance is like a 
living thing and understands messages it receives by searching a method by the name of the received 
message, invoke it (and supply arguments if any) and return any return value, if any


Should there be any questions please do not hesitate and ask them.

---rony



On 22.06.2022 07:31, Andrew Rowley wrote:

On 22/06/2022 9:03 am, Charles Mills wrote:
Can one write a Started Task in Java? What would the JCL look like (neglecting 
application-specific items)?


This is a basic Java program that runs and responds to MODIFY and STOP commands:

import java.time.*;
import com.ibm.jzos.MvsCommandCallback;
import com.ibm.jzos.MvsConsole;

public class JavaStc
{
    static volatile boolean stopped = false;
    static final Instant startTime = Instant.now();

    public static void main(String[] args) throws InterruptedException
    {
    if (!MvsConsole.isListening())
    {
    MvsConsole.startMvsCommandListener();
    }
    MvsConsole.registerMvsCommandCallback(new CommandCallback());

    while (!stopped)
    {
    Thread.sleep(1000);
    }
    }

    static class CommandCallback implements MvsCommandCallback
    {
    public void handleModify(String arg0)
   

Re: Some UNIX file usage questions

2022-06-21 Thread Rony G. Flatscher

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 

Re: Rexx copy to OMVS

2022-03-09 Thread Rony G Flatscher
Unfortunately, no. 

However the ooRexx-Sourceforge file section allows one to download ooRexx 5.0 
for any supported operating system. 

Whenever there is a new commit to ooRexx 5.0 a Jenkins farm of many different 
operating systems will recompile the latest version from trunk and also run the 
excessive test suite against each version. 

ooRexx 5.0 on Sourceforge then will get these compiled and tested ooRexx 5.0 
versions from Jenkins uploaded. So it is a safe bet to look fir the latest 
versions there.

—-rony

Rony G. Flatscher (mobil/e)

> Am 09.03.2022 um 20:43 schrieb Seymour J Metz :
> 
> Great! Time to update.
> 
> Do you know whether that version will be in openSUSE LEAP 15.4, which is now 
> in beta?
> 
> 
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
> 
> 
> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
> Rony G. Flatscher [rony.flatsc...@wu.ac.at]
> Sent: Wednesday, March 9, 2022 2:03 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Rexx copy to OMVS
> 
>> On 09.03.2022 18:01, Seymour J Metz wrote:
>> Yes, "mycmd myopts" is an expression that evaluates to the command string. 
>> It could as well have been a single variable, a literal or a more 
>> complicated expression.
>> 
>> Yes, it's synchronous. Alas, OOREXX doesn't have the ANSI address syntax and 
>> Regina doesn't have multitasking.
> 
> ooRexx 5.0 got the ANSI address syntax added to it, here an example:
> 
>say "demonstrate ANSI REXX in ooRexx 5.0 ('ADDRESS ... WITH ...')"
>parse version v
>say "version:" v
>say
> 
>say "sorting a stem using the operating system 'sort' command:"
>   /* define the stem array   */
>in.1="Zeppelin"
>in.2="berta"
>in.3="Anthony"
>in.0=3
>cmd="sort"  /* operating system command 'sort'  */
>address system cmd with input stem in. output stem res.
>do i=1 to res.0 /* iterate over all stem elements   */
>   say i":" res.i
>end
> 
>say "---"
>say "sorting an array using the operating system 'sort' command:"
>   /* define the array*/
>names=.array~of("Xavier", "New York", "caesar")
>arrOut=.array~new   /* create array to fetch stdout */
>address system cmd with input using (names) output using(arrOut)
>do i=1 to arrOut~items
>   say i":" arrOut[i]   /* iterate over all array elements  */
>end
> 
> The above program runs on Windows and Unix as these operating systems possess 
> a 'sort' command, here
> the output running the above program on Windows:
> 
>G:\tmp\orx\address>test.rex
>demonstrate ANSI REXX in ooRexx 5.0 ('ADDRESS ... WITH ...')
>version: REXX-ooRexx_5.0.0(MT)_32-bit 6.05 30 Jan 2022
> 
>sorting a stem using the operating system 'sort' command:
>1: Anthony
>2: berta
>3: Zeppelin
>---
>sorting an array using the operating system 'sort' command:
>1: caesar
>2: New York
>3: Xavier
> 
> This is really a great feature, students love it as it dramatically 
> simplifies running commands and
> redirecting stdin, stdout and stderr from/to stems, streams (files) and 
> collections (like arrays in
> the above example).
> 
> ---rony
> 
>> 
>> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
>> Paul Gilmartin [000433f07816-dmarc-requ...@listserv.ua.edu]
>> Sent: Wednesday, March 9, 2022 11:47 AM
>> To: IBM-MAIN@LISTSERV.UA.EDU
>> Subject: Re: Rexx copy to OMVS
>> 
>>> On Wed, 9 Mar 2022 16:26:36 +, Seymour J Metz wrote:
>>> 
>>> address SYSTEM mycmd myopts WITH INPUT foo OUTPUT FIFO
>>> address SYSTEM mycmd myopts WITH INPUT foo OUTPUT STEM bar.
>>> address SYSTEM mycmd myopts WITH INPUT foo OUTPUT STEM bar. ERROR APPEND baz
>>> 
>> Each of those is synchronous, not returning control to the Rexx scriipt
>> until "mycmd myopts" terminates, not suitable for a long-running command.
>> 
>> (Isn't myopts merely part  of the command string?)
>> 
>>> Why won't popen let you redirect both stdin and stdout? Or all three?
>>> 
>> Desirable, but entailing synchronization problems unless Rexx were
>> also to provide the lacking SYSCAL SELECT:
>>
>> <https://secure-web.cisco.com/1DRefECC2oZAuUy07BTqqULOi5BWpTRjE1YzaoJUi5iQr-m4qNgCXBzb6ahZOYtX9F59cqxdALciiFBYa7quyrppYYEeL3up7VXSvvnQfjq_o8

Re: Rexx copy to OMVS

2022-03-09 Thread Rony G. Flatscher
On 09.03.2022 18:01, Seymour J Metz wrote:
> Yes, "mycmd myopts" is an expression that evaluates to the command string. It 
> could as well have been a single variable, a literal or a more complicated 
> expression.
>
> Yes, it's synchronous. Alas, OOREXX doesn't have the ANSI address syntax and 
> Regina doesn't have multitasking.

ooRexx 5.0 got the ANSI address syntax added to it, here an example:

say "demonstrate ANSI REXX in ooRexx 5.0 ('ADDRESS ... WITH ...')"
parse version v
say "version:" v
say

say "sorting a stem using the operating system 'sort' command:"
   /* define the stem array   */
in.1="Zeppelin"
in.2="berta"
in.3="Anthony"
in.0=3
cmd="sort"  /* operating system command 'sort'  */
address system cmd with input stem in. output stem res.
do i=1 to res.0 /* iterate over all stem elements   */
   say i":" res.i
end

say "---"
say "sorting an array using the operating system 'sort' command:"
   /* define the array*/
names=.array~of("Xavier", "New York", "caesar")
arrOut=.array~new   /* create array to fetch stdout */
address system cmd with input using (names) output using(arrOut)
do i=1 to arrOut~items
   say i":" arrOut[i]   /* iterate over all array elements  */
end

The above program runs on Windows and Unix as these operating systems possess a 
'sort' command, here
the output running the above program on Windows:

G:\tmp\orx\address>test.rex
demonstrate ANSI REXX in ooRexx 5.0 ('ADDRESS ... WITH ...')
version: REXX-ooRexx_5.0.0(MT)_32-bit 6.05 30 Jan 2022

sorting a stem using the operating system 'sort' command:
1: Anthony
2: berta
3: Zeppelin
---
sorting an array using the operating system 'sort' command:
1: caesar
2: New York
3: Xavier

This is really a great feature, students love it as it dramatically simplifies 
running commands and
redirecting stdin, stdout and stderr from/to stems, streams (files) and 
collections (like arrays in
the above example).

---rony

> 
> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
> Paul Gilmartin [000433f07816-dmarc-requ...@listserv.ua.edu]
> Sent: Wednesday, March 9, 2022 11:47 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Rexx copy to OMVS
>
> On Wed, 9 Mar 2022 16:26:36 +, Seymour J Metz wrote:
>
>> address SYSTEM mycmd myopts WITH INPUT foo OUTPUT FIFO
>> address SYSTEM mycmd myopts WITH INPUT foo OUTPUT STEM bar.
>> address SYSTEM mycmd myopts WITH INPUT foo OUTPUT STEM bar. ERROR APPEND baz
>>
> Each of those is synchronous, not returning control to the Rexx scriipt
> until "mycmd myopts" terminates, not suitable for a long-running command.
>
> (Isn't myopts merely part  of the command string?)
>
>> Why won't popen let you redirect both stdin and stdout? Or all three?
>>
> Desirable, but entailing synchronization problems unless Rexx were
> also to provide the lacking SYSCAL SELECT:
> 
> 
>
>> 
>> From: Paul Gilmartin
>> Sent: Wednesday, March 9, 2022 10:47 AM
>>...
>> OTOH, I know of no other Rexx with the facility of z/OS STREAM POPEN:
> --
> gil
>


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Speedy, speedier, speedest (Re: Ad message paradigm (Re: Ad NetRexx (Re: Ad programming features (Re: ... Re: Top 8 Reasons for using Python instead of REXX for z/OS

2022-01-11 Thread Rony G. Flatscher
On 11.01.2022 14:06, David Crayford wrote:
> I've gone silent now Rony. But if you're a Windows user you may want to check 
> out Measure-Command
> for PowerShell so you don't have to instrument your code with timers.
>
> [1]
> https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/measure-command?view=powershell-7.2

Thank you for this pointer, David!

Mostly I have been working on Windows, but also on Linux and MacOS, for making 
sure that BSF4ooRexx
runs flawlessly and seamlessly on all those platforms.

---rony


>
> On 11/1/22 8:30 pm, Rony G. Flatscher wrote:
>> And here an example of ooRexx being used without any direct access to Java:
>>
>>  d1=.datetime~new  /* take time   */
>>  "java squares"    /* run command */
>>  d2=.datetime~new  /* take time   */
>>  say "duration:" d2-d1
>>
>> The results of running this program are:
>>
>>  G:\tmp\ibmmain\arrays>squares_oorexx.rex
>>  100
>>  duration: 00:00:00.247000
>>
>>  G:\tmp\ibmmain\arrays>squares_oorexx.rex
>>  100
>>  duration: 00:00:00.242000
>>
>> Quite fast! ;)
>>
>> ---rony
>>
>> On 11.01.2022 13:15, Rony G. Flatscher wrote:
>>> Now, if you want ooRexx to control an application and need to run the 
>>> NetRexx program from it, you
>>> can do that with ooRexx (including timings) as such:
>>>
>>>  /* ooRexx solution to control execution of NetRexx' squares  */
>>>  clz=bsf.loadClass("squares")  /* load NetRexx' squares class */
>>>
>>>  /* create an empty Java array of type java.lang.String   */
>>>  arr=bsf.createJavaArrayOf("java.lang.String")
>>>
>>>  d1=.dateTime~new  /* take time   */
>>>  /* run main method which expects a Java String array */
>>>  clz~main(arr)
>>>  d2=.dateTime~new  /* take time   */
>>>  say "duration:" d2-d1
>>>
>>>  ::requires "BSF.CLS" /* get full access to Java  */
>>>
>>> The results of running this program are, believe it or not, even faster:
>>>
>>>  G:\tmp\ibmmain\arrays>rexx squares.rxj
>>>  100
>>>  duration: 00:00:00.095000
>>>
>>>  G:\tmp\ibmmain\arrays>rexx squares.rxj
>>>  100
>>>  duration: 00:00:00.109000
>>>
>>> So the interpreted ooRexx can even beat ... :)
>>>
>>> ---rony
>>>
>>>
>>> On 11.01.2022 12:21, Rony G. Flatscher wrote:
>>>> On 11.01.2022 05:46, David Crayford wrote:
>>>>> On 10/1/22 11:15 pm, Seymour J Metz wrote:
>>>>>>> ooRexx will never be high speed because it's implementation is
>>>>>>> fundamentally ineffecient.
>>>>>> That seems to be begging the question. Certainly the current 
>>>>>> implementation is inefficient, but
>>>>>> what fundamental issue prevents a more efficient implementation?
>>>>> A more effecient implementation requires a rewrite.
>>>>>
>>>>>> For that matter, what fundamental issue prevents compiling into Java 
>>>>>> bytecode with a large
>>>>>> runtime similar to the CREXX runtime?
>>>>> None. TBH, I hadn't had much of a look at NetRexx but it's promising. 
>>>>> It's strongly typed and the
>>>>> JVM is going to JIT compile it so it will be fast. As Rene mentioned you 
>>>>> can use Java classes so
>>>>> there is a massive eco-system available.
>>>> BTW, you could use Java classes from ooRexx as well, hence there is a 
>>>> "massive eco-system
>>>> available"
>>>> for ooRexx. You would need the external function package named BSF4ooRexx, 
>>>> which enables ooRexx to
>>>> work with any Java class library, no matter whether it got created with 
>>>> Java, NetRexx, Kotlin,
>>>> Groovy, ...
>>>>
>>>>> I knocked up some simple benchtests which create an array of squares and 
>>>>> then find the maximum
>>>>> value. The maximum value is the end element. The results are just what I 
>>>>> expected. ooRexx
>>>>> performs
>>>>> poorly.
>>>> Not a surprise. :)
>>>>
>>>> This

Re: Speedy, speedier, speedest (Re: Ad message paradigm (Re: Ad NetRexx (Re: Ad programming features (Re: ... Re: Top 8 Reasons for using Python instead of REXX for z/OS

2022-01-11 Thread Rony G. Flatscher
And here an example of ooRexx being used without any direct access to Java:

d1=.datetime~new  /* take time   */
"java squares"/* run command */
d2=.datetime~new  /* take time   */
say "duration:" d2-d1

The results of running this program are:

G:\tmp\ibmmain\arrays>squares_oorexx.rex
100
duration: 00:00:00.247000

G:\tmp\ibmmain\arrays>squares_oorexx.rex
100
duration: 00:00:00.242000

Quite fast! ;)

---rony

On 11.01.2022 13:15, Rony G. Flatscher wrote:
> Now, if you want ooRexx to control an application and need to run the NetRexx 
> program from it, you
> can do that with ooRexx (including timings) as such:
>
> /* ooRexx solution to control execution of NetRexx' squares  */
> clz=bsf.loadClass("squares")  /* load NetRexx' squares class */
>
> /* create an empty Java array of type java.lang.String   */
> arr=bsf.createJavaArrayOf("java.lang.String")
>
> d1=.dateTime~new  /* take time   */
> /* run main method which expects a Java String array */
> clz~main(arr)
> d2=.dateTime~new  /* take time   */
> say "duration:" d2-d1
>
> ::requires "BSF.CLS" /* get full access to Java  */
>
> The results of running this program are, believe it or not, even faster:
>
> G:\tmp\ibmmain\arrays>rexx squares.rxj
> 100
> duration: 00:00:00.095000
>
> G:\tmp\ibmmain\arrays>rexx squares.rxj
> 100
> duration: 00:00:00.109000
>
> So the interpreted ooRexx can even beat ... :)
>
> ---rony
>
>
> On 11.01.2022 12:21, Rony G. Flatscher wrote:
>> On 11.01.2022 05:46, David Crayford wrote:
>>> On 10/1/22 11:15 pm, Seymour J Metz wrote:
>>>>> ooRexx will never be high speed because it's implementation is
>>>>> fundamentally ineffecient.
>>>> That seems to be begging the question. Certainly the current 
>>>> implementation is inefficient, but
>>>> what fundamental issue prevents a more efficient implementation?
>>> A more effecient implementation requires a rewrite.
>>>
>>>> For that matter, what fundamental issue prevents compiling into Java 
>>>> bytecode with a large
>>>> runtime similar to the CREXX runtime?
>>> None. TBH, I hadn't had much of a look at NetRexx but it's promising. It's 
>>> strongly typed and the
>>> JVM is going to JIT compile it so it will be fast. As Rene mentioned you 
>>> can use Java classes so
>>> there is a massive eco-system available.
>> BTW, you could use Java classes from ooRexx as well, hence there is a 
>> "massive eco-system available"
>> for ooRexx. You would need the external function package named BSF4ooRexx, 
>> which enables ooRexx to
>> work with any Java class library, no matter whether it got created with 
>> Java, NetRexx, Kotlin,
>> Groovy, ...
>>
>>> I knocked up some simple benchtests which create an array of squares and 
>>> then find the maximum
>>> value. The maximum value is the end element. The results are just what I 
>>> expected. ooRexx performs
>>> poorly.
>> Not a surprise. :)
>>
>> This "simple benchtest" is architected in a way that makes interpreted 
>> languages look especially bad
>> compared to compiled languages, it is of a form that is not relevant in real 
>> life. Also, using
>> unnecessarily numeric 30 digits for the arithmetics is interesting, as well 
>> as the outdated, seven
>> year old ooRexx 4.2 rather than ooRexx 5.0 does not help either.
>>
>>
>>> Stem variables are particularly bad which is to be expected because they 
>>> are essentially
>>> associative arrays. Using the Array class was much better but the result 
>>> was still many orders of
>>> magnitude worse then the
>>> other languages I tested. What's interesting is that LuaJIT is as fast as 
>>> C++ and interpreted Lua
>>> is almost as fast as Julia which has JIT.
>> Not a surprise. :)
>>
>> Now, if it was truly the case that someone would need such an abmysal amount 
>> of number crunching
>> then speed becomes interesting. In such a case what I would do for any 
>> interpreted language, I would
>> use a compiled one.
>>
>> As you point out the compiled versions (cpp, JIT-etc. compiled one) let the 
>> interpreted languages
>> bite the dust. The question then would be whether to solve this particular

Re: Speedy, speedier, speedest (Re: Ad message paradigm (Re: Ad NetRexx (Re: Ad programming features (Re: ... Re: Top 8 Reasons for using Python instead of REXX for z/OS

2022-01-11 Thread Rony G. Flatscher
Now, if you want ooRexx to control an application and need to run the NetRexx 
program from it, you
can do that with ooRexx (including timings) as such:

/* ooRexx solution to control execution of NetRexx' squares  */
clz=bsf.loadClass("squares")  /* load NetRexx' squares class */

/* create an empty Java array of type java.lang.String   */
arr=bsf.createJavaArrayOf("java.lang.String")

d1=.dateTime~new  /* take time   */
/* run main method which expects a Java String array */
clz~main(arr)
d2=.dateTime~new  /* take time   */
say "duration:" d2-d1

::requires "BSF.CLS" /* get full access to Java  */

The results of running this program are, believe it or not, even faster:

G:\tmp\ibmmain\arrays>rexx squares.rxj
100
duration: 00:00:00.095000

G:\tmp\ibmmain\arrays>rexx squares.rxj
100
duration: 00:00:00.109000

So the interpreted ooRexx can even beat ... :)

---rony


On 11.01.2022 12:21, Rony G. Flatscher wrote:
> On 11.01.2022 05:46, David Crayford wrote:
>> On 10/1/22 11:15 pm, Seymour J Metz wrote:
>>>> ooRexx will never be high speed because it's implementation is
>>>> fundamentally ineffecient.
>>> That seems to be begging the question. Certainly the current implementation 
>>> is inefficient, but
>>> what fundamental issue prevents a more efficient implementation?
>> A more effecient implementation requires a rewrite.
>>
>>> For that matter, what fundamental issue prevents compiling into Java 
>>> bytecode with a large
>>> runtime similar to the CREXX runtime?
>> None. TBH, I hadn't had much of a look at NetRexx but it's promising. It's 
>> strongly typed and the
>> JVM is going to JIT compile it so it will be fast. As Rene mentioned you can 
>> use Java classes so
>> there is a massive eco-system available.
> BTW, you could use Java classes from ooRexx as well, hence there is a 
> "massive eco-system available"
> for ooRexx. You would need the external function package named BSF4ooRexx, 
> which enables ooRexx to
> work with any Java class library, no matter whether it got created with Java, 
> NetRexx, Kotlin,
> Groovy, ...
>
>> I knocked up some simple benchtests which create an array of squares and 
>> then find the maximum
>> value. The maximum value is the end element. The results are just what I 
>> expected. ooRexx performs
>> poorly.
> Not a surprise. :)
>
> This "simple benchtest" is architected in a way that makes interpreted 
> languages look especially bad
> compared to compiled languages, it is of a form that is not relevant in real 
> life. Also, using
> unnecessarily numeric 30 digits for the arithmetics is interesting, as well 
> as the outdated, seven
> year old ooRexx 4.2 rather than ooRexx 5.0 does not help either.
>
>
>> Stem variables are particularly bad which is to be expected because they are 
>> essentially
>> associative arrays. Using the Array class was much better but the result was 
>> still many orders of
>> magnitude worse then the
>> other languages I tested. What's interesting is that LuaJIT is as fast as 
>> C++ and interpreted Lua
>> is almost as fast as Julia which has JIT.
> Not a surprise. :)
>
> Now, if it was truly the case that someone would need such an abmysal amount 
> of number crunching
> then speed becomes interesting. In such a case what I would do for any 
> interpreted language, I would
> use a compiled one.
>
> As you point out the compiled versions (cpp, JIT-etc. compiled one) let the 
> interpreted languages
> bite the dust. The question then would be whether to solve this particular 
> problem in an interpreted
> language at all.
>
> In the case of REXX-savvy programmers I would suggest to use NetRexx for this 
> particular purpose:
>
> /* NetRexx: squares.nrx  */
> options binary/* in this case we want speed */
> items = 1000
> s = long[items]   /* define a Java array of type long   */
> loop i=1 to items
>n=long i   /* for multiplication we want to use long */
>s[i-1] = n * n
> end
> /* use a Java stream (introduced with Java 8) */
> say java.util.Arrays.stream(s).max.getAsLong
>
> You would compile that NetRexx program with "netrexxc squares.nrx" and run 
> the resulting Java class
> with "java squares".
>
> To give you a feeling for the speed (you can test it right on your own 
> computer and compare with
> your other versions), here the timings of your c+

Speedy, speedier, speedest (Re: Ad message paradigm (Re: Ad NetRexx (Re: Ad programming features (Re: ... Re: Top 8 Reasons for using Python instead of REXX for z/OS

2022-01-11 Thread Rony G. Flatscher
On 11.01.2022 05:46, David Crayford wrote:
> On 10/1/22 11:15 pm, Seymour J Metz wrote:
>>> ooRexx will never be high speed because it's implementation is
>>> fundamentally ineffecient.
>> That seems to be begging the question. Certainly the current implementation 
>> is inefficient, but
>> what fundamental issue prevents a more efficient implementation?
>
> A more effecient implementation requires a rewrite.
>
>> For that matter, what fundamental issue prevents compiling into Java 
>> bytecode with a large
>> runtime similar to the CREXX runtime?
>
> None. TBH, I hadn't had much of a look at NetRexx but it's promising. It's 
> strongly typed and the
> JVM is going to JIT compile it so it will be fast. As Rene mentioned you can 
> use Java classes so
> there is a massive eco-system available.

BTW, you could use Java classes from ooRexx as well, hence there is a "massive 
eco-system available"
for ooRexx. You would need the external function package named BSF4ooRexx, 
which enables ooRexx to
work with any Java class library, no matter whether it got created with Java, 
NetRexx, Kotlin,
Groovy, ...

> I knocked up some simple benchtests which create an array of squares and then 
> find the maximum
> value. The maximum value is the end element. The results are just what I 
> expected. ooRexx performs
> poorly.

Not a surprise. :)

This "simple benchtest" is architected in a way that makes interpreted 
languages look especially bad
compared to compiled languages, it is of a form that is not relevant in real 
life. Also, using
unnecessarily numeric 30 digits for the arithmetics is interesting, as well as 
the outdated, seven
year old ooRexx 4.2 rather than ooRexx 5.0 does not help either.


> Stem variables are particularly bad which is to be expected because they are 
> essentially
> associative arrays. Using the Array class was much better but the result was 
> still many orders of
> magnitude worse then the
> other languages I tested. What's interesting is that LuaJIT is as fast as C++ 
> and interpreted Lua
> is almost as fast as Julia which has JIT.

Not a surprise. :)

Now, if it was truly the case that someone would need such an abmysal amount of 
number crunching
then speed becomes interesting. In such a case what I would do for any 
interpreted language, I would
use a compiled one.

As you point out the compiled versions (cpp, JIT-etc. compiled one) let the 
interpreted languages
bite the dust. The question then would be whether to solve this particular 
problem in an interpreted
language at all.

In the case of REXX-savvy programmers I would suggest to use NetRexx for this 
particular purpose:

/* NetRexx: squares.nrx  */
options binary/* in this case we want speed */
items = 1000
s = long[items]   /* define a Java array of type long   */
loop i=1 to items
   n=long i   /* for multiplication we want to use long */
   s[i-1] = n * n
end
/* use a Java stream (introduced with Java 8)   */
say java.util.Arrays.stream(s).max.getAsLong

You would compile that NetRexx program with "netrexxc squares.nrx" and run the 
resulting Java class
with "java squares".

To give you a feeling for the speed (you can test it right on your own computer 
and compare with
your other versions), here the timings of your c++ program (compiled with MS 
cl) and this NetRexx
program on my Windows 10 laptop (all in 32-bit mode):

  * c++ (using MS compiler) out of the box:
G:\tmp\ibmmain\arrays>timeit squares.exe
*** ooRexx-Timeit:  command: squares.exe

100
*** ended.

*** command:  squares.exe
*** started:  2022-01-11T11:19:55.506000
*** ended:    2022-01-11T11:19:56.493000
 duration: 00:00:00.987000*

  * NetRexx (Java 17) out of the box:

G:\tmp\ibmmain\arrays>timeit java squares
*** ooRexx-Timeit:  command: java squares

100
*** ended.

*** command:  java squares
*** started:  2022-01-11T12:09:51.849000
*** ended:    2022-01-11T12:09:52.134000
 duration: 00:00:00.285000*

As C++ on your machine was fastest of all compiled solutions, this may be quite 
surprising: NetRexx
can beat even C++! :)

Again: pick the language that meets the job at hand at best! Doing abmysal 
loopings, arrays, etc.
pick a compiled language, solving "bread-and-butter" problems use the language 
that allows you to
quickly create the program solution in a readable, maintable manner.

REXX programmers have good reasons why they use an interpreter for their 
problem solutions for
decades on mainframes.

And as can be seen, even such artificial samples constructed to make 
interpreters look bad, it is
not difficult for programmers with REXX knowledge to use NetRexx to solve 
problems that really would
need "hi speed".

Or with other words: whenever REXX programmers need functionality and speed on 
a mainframe they
resort to external native programs that they instrumentate. The same is 
possible with 

Re: Ad message paradigm (Re: Ad NetRexx (Re: Ad programming features (Re: ... Re: Top 8 Reasons for using Python instead of REXX for z/OS

2022-01-10 Thread Rony G. Flatscher
On 10.01.2022 14:13, David Crayford wrote:
> On 10/1/22 8:34 pm, Rony G. Flatscher wrote:
>> On 09.01.2022 16:29, Seymour J Metz wrote:
>>>> Well all of your languages miss the support for the message paradigm.
>>> What do you mean by "the message paradigm"? How does it differ from sending 
>>> method invocation
>>> and response messages to objects?
>> The message paradigm as set forth by Smalltalk explicitly defines a class 
>> for messages, allows for
>> intercepting messages, rerouting messages at the will of the programmer and 
>> much more, as messages
>> themselves become objects that the programmer can interact with, if needed.
>>
>> ooRexx implements the message paradigm in full, something that is easily 
>> overlooked as usually it is
>> not necessary to be aware of it.
>
> If it's not necessary then why did you make such a big deal about it?

Well if you have really read the entire post you should know. Without 
implementing the message
paradigm things become clumsy and some important features, if you need them, 
are simply not available.


>
>> As you can see, if there should be need for adding external functions and/or 
>> methods to ooRexx, this
>> can be done with the powerful and easy to use C++ API of ooRexx. As a matter 
>> of fact BSF4ooRexx and
>> dbusoorexx are using those native C++ APIs allowing high speed and using all 
>> that is available in
>> and via the C++ world.
>
> ooRexx will never be high speed because it's implementation is fundamentally 
> ineffecient. 

LOL!

ooRexx for any practical purpose is more than speedy enough! And its speedness 
has been excercised
in quite a few applications I wrote in the past twenty, twenty fiver years.

Have you every tried it out, e.g. for controlling applications, processes, 
having macros dispatched
against hosting applications, for processing MS Office documents, 
OpenOffice/LibreOffice documents,
controlling your Linux infrastructure via DBus, taking advantage of e.g. data 
mining Java class
libraries etc., etc.?

Clearly you have not, hence it is unfortunately ongoing badmouthing without any 
practical experience
knowledge.


> Most scripting languages compile to bytecode which is then processed by a VM. 
> For example, the Lua
> VM is less tha 2K lines of code and can fit into L2 cache which is why it's 
> blistering fast
> https://www.lua.org/source/5.1/lvm.c.html. 

Cool! If high speed is so important then Assembler would be much better, of 
course, forget Lua by
comparison! ;)


> ooRexx chose to use a graph of C++ classes with abstract base classes for 
> every instruction and
> clause. OMG, dynamic dispatch for every instruction!

You seem to not understand - or intentionally ignore - the implications of a 
true implementation of
the message paradigm, the power, the flexibility and the easeness for 
unleashing it.


> https://github.com/ooRexx/ooRexx/tree/master/interpreter/instructions
>
> It's gigantic clump of inefficient code based upon inheritance. 

Badmouthing again. If you really believe that you should go back to text books 
then and read about
oo and inheritance all over and  stop requesting OO-features to be present in 
programming languages
at all, which you have been claiming is so important in the first place...

And while giving us the impression you would be an expert in this field how 
does it compare to
Objective-C?

Now the red herring seems to be clumsiness, high speed, unnecessary 
inheritance, ... unfortunately
distracting and badmouthing again. :(


> The GoF Design Patterns book which dates back to the 90s was a 
> groundbreaking, seminal work which
> had a central theme of introducing patterns to avoid inheritance. 

Please stop giving misinformation (I have read the book decades ago)!

But fighting inheritance, declaring it to be useless, clumsy all of a sudden is 
quite strange to say
the least.


> Modern languages like Rust don't even support Inheritance.

There are assemblers that do neither, so wouldn't they be much better than Rust 
then?  ;)

[Your "name calling" of languages suggesting you would be an expert in all of 
them has not been
really convincing and not really relevant in this context.]


> If you want high speed then use a JIT compiler. The Lua Functional library 
> used with LuaJIT can
> boil a chain of method calls down to a dozen instructions with no linkage 
> overhead
> https://luafun.github.io/intro.html. The Julia programming language can do 
> the same with similar
> syntax. If I wanted to use REXX
> I would use NetRexx to take advantage of the JVM JIT.

Indeed, if high speed is of high priority and you are not able to mix and match 
languages then that
is always a nice path to go: starting out with Assembler of course.

And yes, N

Re: Port of ooRexx to z/OS? (Re: Ad NetRexx (Re: Ad programming features (Re: ... Re: Top 8 Reasons for using Python instead of REXX for z/OS

2022-01-10 Thread Rony G. Flatscher
On 10.01.2022 05:28, David Crayford wrote:
> On 9/1/22 11:22 pm, Rony G. Flatscher wrote:
>> On 09.01.2022 03:19, David Crayford wrote:
>>> On 9/1/22 2:15 am, Rony G. Flatscher wrote:
>>>> On 08.01.2022 01:52, David Crayford wrote:
>>>>> On 7/1/22 7:53 pm, Rony G. Flatscher wrote:

... cut ...

>>> Number 7 on my list is support for OO which implies message passing.
>> Well, this does not mean that the programming language supports the message 
>> paradigm. If it did it
>> would have an explicit "Message" class (like there are explicit classes like 
>> "Object", "Class",
>> "Method" and the like), hence messages are not FCOs. Compare this to 
>> languages like SmallTalk or
>> ooRexx.
>>
>> Maybe it is easier to grasp some of the ramifications by looking at the 
>> popular fluent pattern
>> (https://en.wikipedia.org/wiki/Fluent_interface) which needs to be 
>> explicitly programmed in
>> languages that do not support the message paradigm, but is "freely" ;) 
>> available in languages like
>> Smalltalk and ooRexx.
>
> I'm familiar with fluent APIs. I've been coding C++ and Java for over 25 
> years. They don't need an
> explict "Message", "Object" or "Class". In Java every object is a subclass of 
> Obect. C++ is a
> multi-paradigm language so doesn't require that.
> To write a fluent interface in C++, Java, JavaScript just return "this" from 
> the class method or
> member function. In Lua or Python return self. Then you can chain together 
> method calls. This is
> meat a potatoes stuff in all of the languages I listed.

Yes, one has to explicitly change the method signatures in strictly typed 
languages to return the
object for which the method executes and one must supply the appropriate return 
statement in each of
these methods, which is fine.

---

In ooRexx however, you do not have to explicitly code "return self" in methods 
in order to use
methods of a class fluently. It even does not matter whether a method returns 
the proper object
(referred to with the variable named self in the fluent method) or has no 
return value at all! If an
ooRexx programmer wants to use an object's/value's/instance's methods 
("behaviour") fluently, he can
do so independent of whether the method returns the proper object or not.

It is this flexibility (if needed) that is available by design, because of the 
full implementation
of the message paradigm, relieving the programmers of burdens they must undergo 
in many popular
programming languages, and all must apply properly the pattern.

---

There are other aspects, abilities that ooRexx possesses that other popular 
programming languages
lack because of the message paradigm ooRexx implements. As a little teaser, if 
interested, just
look-up the ooRexx runtime objects named .input, .output and .error. As 
harmless as they may look,
it is incredible which power they make available to programmers if need be. But 
that would be
another story ...

---rony

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Ad message paradigm (Re: Ad NetRexx (Re: Ad programming features (Re: ... Re: Top 8 Reasons for using Python instead of REXX for z/OS

2022-01-10 Thread Rony G. Flatscher
On 09.01.2022 16:29, Seymour J Metz wrote:
>> Well all of your languages miss the support for the message paradigm.
> What do you mean by "the message paradigm"? How does it differ from sending 
> method invocation and response messages to objects?

The message paradigm as set forth by Smalltalk explicitly defines a class for 
messages, allows for
intercepting messages, rerouting messages at the will of the programmer and 
much more, as messages
themselves become objects that the programmer can interact with, if needed.

ooRexx implements the message paradigm in full, something that is easily 
overlooked as usually it is
not necessary to be aware of it.

A REXX programmer may stick to REXX programs and still is able to use ooRexx to 
run them as ooRexx
is a snap-in replacement which supports all of REXX and adds additional 
features. For anyone who is
not acquainted to REXX or ooRexx the little ten page 
paper gives an
introduction and explains the most important concepts. There is no need for 
more pages to make the
language understandable and applicable for those who already know how to 
program (including
Assembler, VB/VBA/VBA.Net, Python etc. programmers).

In ooRexx messages in code can be identified by locating the message operator 
(tilde: ~). Classic
REXX BIFs (built-in functions) like c2x(), reverse(), substr() etc. are 
available in ooRexx, but
"behind the curtain" the implementation of each string BIF is organized in the 
"String"
class/structure/type where the implementation resides in form of method 
routines that are named
"c2x", "reverse", "substr" and the like. Usually this is not important to know 
if using REXX
concepts only. In the context of this discussion however it allows for 
understanding how ooRexx
works "behind the curtain": everything in ooRexx (like in Smalltalk) is an 
object (synonyms: value,
instance).

Conceptually a programmer communicates with objects by sending them messages as 
if objects were
living things. The object receives the message and will start out to look for a 
method it possesses
that carries the same name as the received message. Once the method is located, 
the object invokes
it, supplying any arguments that may have been given with the message. If the 
method returns a value
(object, instance), the object will return it to the caller. So in the caller 
the message expression
will get replaced with the returned value.

To see how this works an example in REXX (which ooRexx understands and is able 
to execute) and one
in ooRexx:

  * REXX (and ooRexx)

str="?yadot uoy era woh ,tsiL-MBI ,olleH"
say reverse(str) /* reverse the string and show it */

  * ooRexx (message style)

str="?yadot uoy era woh ,tsiL-MBI ,olleH"
say str~reverse  /* reverse the string and show it */

Both yield the same result, here a rexxtry session (in this case on Windows 10):

F:\work\svn\bsf4oorexx\trunk\bsf4oorexx\samples\clr\raffel>rexxtry
REXX-ooRexx_5.0.0(MT)_32-bit 6.05 30 Nov 2021
  rexxtry.rex lets you interactively try REXX statements.
Each string is executed when you hit Enter.
Enter 'call tell' for a description of the features.
  Go on - try a few...Enter 'exit' to end.

str="?yadot uoy era woh ,tsiL-MBI ,olleH"
  ... rexxtry.rex on WindowsNT
say reverse(str)
Hello, IBM-List, how are you today?
  ... rexxtry.rex on WindowsNT
say str~reverse
Hello, IBM-List, how are you today?
  ... rexxtry.rex on WindowsNT

As you can see the results are identical. Here a version that first reverses 
the string, replaces
commas with a blank in the string and then extracts the second word and 
displays it, using the same
rexxtry session:

say word(changestr(',',reverse(str),' '),2)
IBM-List
  ... rexxtry.rex on WindowsNT
say str~reverse~changestr(',',' ')~word(2)
IBM-List
  ... rexxtry.rex on WindowsNT

As one can have white space around the message operator one could use it to 
e.g. format the message
version as:

say str~reverse ~changestr(',',' ') ~word(2)
IBM-List
  ... rexxtry.rex on WindowsNT

Once one is accustomed to the message paradigm it becomes easy to use it (and 
also to read the
message version statements).

---

One nice thing about this is the abstraction that goes with it: we as 
programmers do not need to
understand how the implementation goes we only need to know which messages an 
object understands and
then send it to it (the object has the knowledge and inventory to resolve it 
appropriately).

---

However there is much more a full implementation of the message paradigm allows 
for, e.g. monitoring
messages that get sent to an object, rerouting/forwarding messages to 

Re: Ad NetRexx (Re: Ad programming features (Re: ... Re: Top 8 Reasons for using Python instead of REXX for z/OS

2022-01-09 Thread Rony G. Flatscher
On 09.01.2022 05:52, Wayne Bickerdike wrote:
> I couldn't find Netrexx at  (https://www.netrexx.org), I did find it here
> http://www.netrexx.org 
Ah, "http" instead of "https", sorry (wrote it from memory and did not test it) 
!
> I like it!

+1

---rony

... cut ...

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Port of ooRexx to z/OS? (Re: Ad NetRexx (Re: Ad programming features (Re: ... Re: Top 8 Reasons for using Python instead of REXX for z/OS

2022-01-09 Thread Rony G. Flatscher
On 09.01.2022 03:19, David Crayford wrote:
> On 9/1/22 2:15 am, Rony G. Flatscher wrote:
>> On 08.01.2022 01:52, David Crayford wrote:
>>> On 7/1/22 7:53 pm, Rony G. Flatscher wrote:
>>>>
... cut ... 

>> Well all of your languages miss the support for the message paradigm.
>
> What on earth are you talking about? 

Hmm, this sounds quite emotional. :)


> Number 7 on my list is support for OO which implies message passing.

Well, this does not mean that the programming language supports the message 
paradigm. If it did it
would have an explicit "Message" class (like there are explicit classes like 
"Object", "Class",
"Method" and the like), hence messages are not FCOs. Compare this to languages 
like SmallTalk or ooRexx.

Maybe it is easier to grasp some of the ramifications by looking at the popular 
fluent pattern
(https://en.wikipedia.org/wiki/Fluent_interface) which needs to be explicitly 
programmed in
languages that do not support the message paradigm, but is "freely" ;) 
available in languages like
Smalltalk and ooRexx.

... cut ...


>>> That's why I have absolutely no interest in NetRexx. I have far better 
>>> options on the JVM.
>> Well, you mention in another post that you were/are an expert REXX 
>> programmer, love Lua, use Python
>> in your shop because of your teams coming with that knowledge from the 
>> colleges, but nowadays you
>> would mainly code in Java/Kotlin. Kudos!
>>
>> What appears to be a little bit strange with such a background is that you 
>> have obviously never
>> really assessed NetRexx, as otherwise you could not possibly have come to 
>> such wrong conclusions.
>
> Why would I invest time into NetRexx. How many NetRexx jobs are there out 
> there? 

Why would that be important?
(Besides, due to NetRexx' design philosophy there is not really much time to 
invest, especially if
you have a good REXX background such that you understand already the purpose of 
e.g. the keyword
statement TRACE; you may want to try to trace a program written in Java or 
Kotlin the way NetRexx
allows for.)

The question to ask is: can NetRexx be used to (quickly) create reliable 
professional applications?
The answer is simple: yes. It is available, it is proven, it has been 
successfully used to create
professional programs. (In case you must supply Java source code, you still can 
use NetRexx and have
it eject Java source code.)

NetRexx creates normal, genuine Java classes as does the Java compiler or the 
Kotlin (or the Groovy
...) compiler. All the compiled Java classes (Java bytecode) can interoperate, 
with each other so it
is possible to use NetRexx compiled Java classes from Java and Kotlin (and 
Groovy ...) and the other
way round, NetRexx can use Java classes compiled from Java or Kotlin (or Groovy 
...) programs and
the like. Therefore it does not matter whether everyone on earth is using 
NetRexx or only a single
person.

The question then is: what is the problem at hand, what programming languages 
qualify best to solve
it? And NetRexx can be used for most problem domains, no need to use a language 
with special
features that are not needed to solve the problem at hand. 

If I were you (with your background), I would seriously look into NetRexx, 
rather then ignore it.
You for sure would quickly become able to solve most of your programming 
problems with it,
exploiting your REXX and Java knowledge. OTOH, if you do not want to look into 
it, that is fine too,
of course, but then, please do not badmouth technologies you simply have no 
experience with.


> Kotlin is not only a first class language for server side it is also the 
> language of choice for
> building Android applications. 

Kotlin and Android is interesting:  Android is a Linux-based operating system 
for which Android
applications have been mostly created in Java for more than a decade, without 
the public even
realizing it (even today). This is the reason why Oracle has been suing Google 
over the use of Java,
although Google used an open source Java implementation from the Apache 
software foundation. Google
used IntelliJ for developing Java applications for Android and even forked 
IntelliJ. The IntelliJ
people came up with Kotlin a few years ago, which is a JVM language compiling 
to Java classes (Java
bytecode), and Google embraced it.

AFAIK most of the Android applications get still created with Java as it takes 
time to learn Kotlin
and as long as Kotlin does not really add great value to the application domain 
it is cheaper to
stick to Java (saving learning curves and new type of coding errors). Besides, 
if you witness the
evolution of the Java language you see that it is not really necessary to 
switch to Kotlin as Java
gains step by step those concepts that programmers find really helpful.

Here a comparison 

Ad NetRexx (Re: Ad programming features (Re: ... Re: Top 8 Reasons for using Python instead of REXX for z/OS

2022-01-08 Thread Rony G. Flatscher
On 08.01.2022 01:52, David Crayford wrote:
> On 7/1/22 7:53 pm, Rony G. Flatscher wrote:
>>> Here is my list of must haves for a scripting language. Does REXX or ooRexx 
>>> meet the requirements?
>>>
>>> 1. Short circuit evaluation
>>> 2. Functions as first class objects
>>> 3. Mutli-threading
>>> 4. Dynamically typed, preferably with type hints
>>> 5. co-routintes
>>> 6. A module system
>>> 7. Support for object oriented programming
>>> 8. Regular expressions
>>> 9. Libraries for web programming, pegs, JSON/YAML parsing etc
>> You also mentioned in your follow up: "Forgot to mention. Support for 
>> functional programming map,
>> reduce, filter etc."
>>
>> This list reads a little bit like a wish list for concepts found in 
>> different programming languages.
>> Sometimes such features are specific for a particular language (e.g. 
>> functional programming) and
>> then sometimes made available in other languages.
>
> Umm, nope. Here is a list of programming languages that I use that support 
> all of my requirements.
>
>  * Javascript
>  * Typescript
>  * Lua
>  * Python
>  * Ruby
>  * Kotlin
>  * Groovy
>
> I could go on. Even Java supports functional programming since Java 1.8 and 
> which introduced the
> streams API. It's unusual to see and old school loop in modern Java code. 
> Even C++ has lambda's.
>
> I missed "closures" on my list which code hand in hand with "functions as 
> first class objects".
> Very powerful, for example in Kotlin you can easily create type safe builders 
> (DSLs)
> https://kotlinlang.org/docs/type-safe-builders.html.

Well all of your languages miss the support for the message paradigm. So, does 
this invalidate all
of your languages? Probably not, as each may serve and prove useful for the one 
or other
purpose/problem. However it means that e.g. in situations where the message 
paradigm becomes
helpful, none of your programming languages/skills qualify. (The same pattern 
you use in your
argument, just turned around a little bit. :) )

None of the above programming languages are human centric by design, such that 
it is not possible to
teach them as quickly as REXX or ooRexx and become productive quickly and 
relevant for as long as a
professional life lasts...

You must not overlook the fact, that IBM was very lucky in having a gentleman 
hired by the name of
Mike F. Cowlishaw who has turned out to be an ingenious language designer, and 
much more. The
history of how REXX got developed and how it became so successful also explains 
why it still is in
professional use and still serves as a beautiful language to teach and to use.

(And as you may know, Mike F. Cowlishaw has been very seminal in quite 
different IT related areas.)


> That's why I have absolutely no interest in NetRexx. I have far better 
> options on the JVM. 

Well, you mention in another post that you were/are an expert REXX programmer, 
love Lua, use Python
in your shop because of your teams coming with that knowledge from the 
colleges, but nowadays you
would mainly code in Java/Kotlin. Kudos!

What appears to be a little bit strange with such a background is that you have 
obviously never
really assessed NetRexx, as otherwise you could not possibly have come to such 
wrong conclusions.

To explain:

  * Mike F. Cowlishaw's (see above) Java expertise has been impressive from the 
early days of Java
which many do not know

  * NetRexx got designed by Mike F. Cowlishaw, and as a matter of fact it is 
the first JVM language,
believe it or not, many years before others have appeared (and many years 
before .Net/clr
languages came into existence too)

  * NetRexx allows REXX programmers to take advantage of their Rexx skills as 
NetRexx follows the
Rexx philosophy, or with other words REXX programmers can quite easily 
create real Java programs
using NetRexx without a need in coding in Java itself, interestingly REXX 
programmers do not
know and realize that (including yourself it seems)

  * NetRexx programmers, if need be, can create Java classes and Java methods 
that other programs
can exploit and use, hence it becomes possible to create Java class 
libraries not in Java, but
in NetRexx only which can be programmed by REXX programmers (whereas the 
learning curve for Java
is probably too steep)

To demonstrate the "difficulty" of creating and understanding NetRexx programs, 
here a simple
example which probably everyone on this list can understand without any further 
explanation, so here
is a NetRex program:

parse version v /* get the NetRexx version*/
say "parse version:" v
parse source s  /* get the source information */
say "parse sour

Re: Macro/script/program (Re: ... Re: Top 8 Reasons for using Python instead of REXX for z/OS

2022-01-08 Thread Rony G. Flatscher
On 07.01.2022 17:38, Seymour J Metz wrote:
> Some language purists claim that the messages are an intrinsic part of 
> object-oriented programming. Check the documentation for Concurrency or for 
> the REPLY instruction for some context.
>
> I always thought that object-oriented programming started with Simula 67 by 
> way of Smalltalk, but according to wiki some of the concepts go back toDoug 
> Ross's Automated Engineering Design/Algol Extended for Design. (AED).
>
>  * <https://en.wikipedia.org/wiki/Douglas_T._Ross#Computer-aided_design>
>  * <https://en.wikipedia.org/wiki/Object-oriented_design>
>  * <https://en.wikipedia.org/wiki/Object-oriented_programming>
>  * <https://en.wikipedia.org/wiki/Simula>
>  * <https://en.wikipedia.org/wiki/Smalltalk#Messages>

Smalltalk is an interesting and important language as it has been having a 
tremendous impact on the
proliferation of the terms such as "object" or "object orientation"
(https://en.wikipedia.org/wiki/Smalltalk). You will also notice that Smalltalk 
is based on the
message paradigm, which is a great paradigm as it helps to abstract from 
implementations, allowing
them to be regarded as black boxes (which inner workings one does not need to 
know), only the
protocol (the set of messages understood, i.e. the set of method routines that 
can be invoked) need
to be known.

In this context it may be interesting to read the following about Alan Kay (cf.
https://en.wikipedia.org/wiki/Alan_Kay):

"... Along with some colleagues at PARC, Kay is one of the fathers of the 
idea of
object-oriented programming 
<https://en.wikipedia.org/wiki/Object-oriented_programming> (OOP),
which he named. Some of the original object-oriented concepts, including 
the use of the words
'object' and 'class', had been developed for Simula 
<https://en.wikipedia.org/wiki/Simula> 67 at
the Norwegian Computing Center 
<https://en.wikipedia.org/wiki/Norwegian_Computing_Center>. Later
he said:

I'm sorry that I long ago coined the term "objects" for this topic 
because it gets many
people to focus on the lesser idea. The big idea is "messaging".

..."

ooRexx is another language that makes the message paradigm available, easying 
the interaction with
different systems (on different systems) considerably.

---rony


> 
> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
> Bob Bridges [robhbrid...@gmail.com]
> Sent: Friday, January 7, 2022 10:16 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Macro/script/program (Re: ... Re: Top 8 Reasons for using Python 
> instead of REXX for z/OS
>
> When I first started learning ooREXX (not that long ago, and I still don't 
> know it well) I read that bit about "messages" that are apparently sent to 
> methods and properties and was confused.  My only object-oriented language at 
> the time was VB (the VBA and VBS varieties), and I thought of methods as 
> merely specialized function calls.
>
> Really I still do, I guess.  I told myself provisionally that the tilde in 
> ooREXX is simply the equivalent of the period in a VBA method or property 
> reference, and although I'm pretty sure that isn't the whole story I was at 
> least able to continue on that basis.  I keep reading descriptions like the 
> below, though, thinking that more will sink in eventually.
>
> ---
> Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313
>
> /* This sad little lizard told me that he was a brontosaurus on his mother's 
> side.  I did not laugh; people who boast of ancestry often have little else 
> to sustain them.  Humoring them costs nothing and adds to happiness in a 
> world in which happiness is always in short supply.  -from the Notebooks of 
> Lazarus Long */
>
> -Original Message-
> From: IBM Mainframe Discussion List  On Behalf Of 
> Rony G. Flatscher
> Sent: Friday, January 7, 2022 07:57
>
>   * The tilde (~) is the ooRexx message operator; one can send messages to 
> any value/object/instance
> in an ooRexx program. Left of the tilde is the receiving 
> value/object/instance/receiver (these
> are synonyms), right of it the name of a method routine that conceptually 
> the receiver is
> supposed to look up and invoke on behalf of the programmer. If the 
> invoked method routine
> returns a result one can immediately send it a message too, if needed.
>


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


VBA -> ooRexx and ooRexx -> VBA (Re: Macro/script/program (Re: ... Re: Top 8 Reasons for using Python instead of REXX for z/OS

2022-01-08 Thread Rony G. Flatscher
On 07.01.2022 16:16, Bob Bridges wrote:
> When I first started learning ooREXX (not that long ago, and I still don't 
> know it well) I read that bit about "messages" that are apparently sent to 
> methods and properties and was confused.  My only object-oriented language at 
> the time was VB (the VBA and VBS varieties), and I thought of methods as 
> merely specialized function calls.
>
> Really I still do, I guess.  I told myself provisionally that the tilde in 
> ooREXX is simply the equivalent of the period in a VBA method or property 
> reference, and although I'm pretty sure that isn't the whole story I was at 
> least able to continue on that basis.  I keep reading descriptions like the 
> below, though, thinking that more will sink in eventually.

That is a great stance! :)

When teaching ooRexx (the course is called "Business Programming"), in the 
middle of the semester
(after two months, 4 hours per week) the students arrive at writing ooRexx 
programs against Windows
and MS Office. They will propose three little projects (controlling three 
Windows applications, one
must not be from Microsoft, from a single ooRexx script that creates value, 
solves a specific
problem) of which one gets picked which they need to implement within a week 
and present it.

Now, newcomers who have never been exposed to programming and those who learned 
some programming
already usually have never worked with OLE and scripting Windows applications 
via OLE. OTOH in the
Windows world VBA is known, popular because of MS Office and those application 
for which VBA got
licensed from MS. Given the huge market share for so many years there are 
incredibly many VBA code
snippets that demonstrate how to achieve some given functionality using VBA, 
such that by studying
the VBA code helps one to find the needed solution path rather quickly (which 
values/objects need to
be fetched, which attributes and method routines with what arguments etc. are 
needed and so on).

Also, they learn that for Windows applications that have VBA as a macro 
language, they can usually
employ some function "record macro" which will record all user generated events 
(key presses,
clicks, selections, etc.) and translate them into the respective VBA macro 
program when exercising a
matching "saving macro". One can then study the resulting VBA macro program to 
see what objects need
to be addressed how, which methods/functions need to be invoked in which 
sequence with what
arguments, etc.

---

The challenge then is: how to translate VBA code to ooRexx? And indeed, the 
simplest advice is to
change the VBA dot (.) to the ooRexx tilde (~), which in 90% of the cases is 
already everything one
needs to know!

The VBA dot (.) operator works like the C++ dot operator (e.g.
), it 
allows one to define a
path (path segments  concatenated by dots) to the embedded member of a 
structure, which can be a an
attribute/field/property, a method routine...

The ooRexx tilde (~) operator is the message operator. Replacing the VBA dot 
with the ooRexx message
operator causes the fetching of the referred to element by fetching each path 
segment one by the
other and in the end referring to the member.

In another post I mentioned that I had employed VBA in the past to teach 
Business administration
students how to automate and program (confined to the Windows world back then), 
that VBA is rather
difficult to teach despite carrying the name "BASIC" in its name. Some of the 
reasons are quite a
few idiosyncracies that need far too much explanation (i.e. too much time) such 
that at the end of
the course there was no time left for learning more about exploiting/applying 
the learned concepts.

Therefore I created a little presentation that documents the most important VBA 
features the
students would be confronted with (e.g. with VBA macro code from "record 
macro") and how they
translate to ooRexx (the students had learned REXX and ooRexx by then, i.e. in 
addition to the BIFs
the additional message paradigm which is available in all contexts). The same 
rules apply also the
other way around, i.e. in translating ooRexx code to VBA code in a Windows 
environment. Here the
link to these slides: 
, cf.
slides # 2 thru # 8 (slide # 8 also demonstrates the different possibilities 
one can exploit in
invoking routines in VBA).

Quite important to know are two things when mapping VBA code to ooRexx code:

  * If a VBA argument is of the form "somearg := abc", then a named argument is 
used (left of the
":=" operator is the name of the argument, right of it the value to be used 
for it). It may be
the case that the named argument "somearg" is not defined at the given 
position, such that one
needs to research the VBA routine/function definition and locate the 
position of the argument
named "somearg". Then in the ooRexx 

Macro/script/program (Re: ... Re: Top 8 Reasons for using Python instead of REXX for z/OS

2022-01-07 Thread Rony G. Flatscher
On 07.01.2022 03:00, Bob Bridges wrote:
> I usually include JCL under the ~very~ general rubric of "programming 
> language", but even mentally I think that's a stretch.  It's more like a 
> macro language, sort of like .bat I guess.
>
> I may as well take this opportunity to include a mild rant.  I've often heard 
> the programs you can write for automating some applications referred to as 
> "macros"; I have in mind VBA, for example, and what WordPerfect used to have 
> if WordPerfect is still around.  It always seemed to me that VBA qualifies 
> just fine as a programming language, and what I write in VBA is not a 
> "macro", just a program.
>
> But then what is a macro?  In searching for some sort of distinction that 
> would justify there being two different words, I've concluded to my own 
> satisfaction that a macro is a set of instructions that have no 
> decision-making capability, maybe no if-then syntax and definitely no 
> looping, probably no arithmetic, possibly some rudimentary logic operators 
> like NOT (and may only NOT).  The old .bat language would fit this 
> description; so would JCL, especially before they added IF statements.  So, 
> if I remember right, are the instruction sets I used to write for QMF.  But 
> not VBA; not even TECO.  (Anyone remember TECO?)
>
> Now I sit back and wait for someone more knowledgeable to correct me either 
> on the capabilities of the languages I named, or on the definition of "macro".

Most of the time Wikipedia is a quite good starting point, e.g.
.

The distinction between a macro/script (a set of statements allowing for 
executing repetitively in
the context of a hosting application) and a stand-alone program can be even 
totally blurred, e.g.
the following ooRexx program can be run from the macro menu of OpenOffice 
(OOO)/LibreOffice (LO) or
as a stand-alone program from the command line:

#!/usr/bin/env rexx
use arg slotArg   /* if called as a macro, we can access the document for 
which we were called  */

scriptContext=uno.getScriptContext(slotArg)  /* get the xScriptContext 
object   */
if scriptContext<>.nil then  /* o.k., we are invoked as a 
macro from OOo/LO */
do
   xContext=scriptContext~getComponentContext   /* get the context (a 
XComponentContext) object */
   xDesktop=scriptContext~getDesktop/* get the desktop (a 
XDesktop) object  */
   oDoc=scriptContext~getInvocationContext  /* get the document for 
which this macro got invoked */
end
else  /* this program was called from outside of OOo, e.g. from the 
commandline  */
do
   xContext = UNO.connect() /* get a connection to the 
OOo/LO server*/
   xDesktop = UNO.createDesktop(xContext)   /* create the XDesktop from 
xContext*/
  /* create a word processor document: */
   
oDoc=xDesktop~XComponentLoader~loadComponentFromURL("private:factory/swriter", 
"_blank", 0, .UNO~noProps)
end

str="Hello IBM-Main ["date() time()"], this is ooRexx (cf. 
) speaking ! "
oDoc~XTextDocument~getText~getEnd~setString(str)

::requires UNO.CLS   /* load UNO support (OpenOffice/LibreOffice) for 
ooRexx  */

This ooRexx macro/script/program runs unchanged on Windows, MacOS and Linux and 
will add a string at
the end of an OOO/LO word document that greets the members of this list and 
supplies the date and
time of its invocation.

A few remarks:

  * ooRexx allows for the "USE ARG" keyword in addition to "PARSE ARG": "USE 
ARG" fetches arguments
by reference and can be used to fetch stems by reference

  * The tilde (~) is the ooRexx message operator; one can send messages to any 
value/object/instance
in an ooRexx program. Left of the tilde is the receiving 
value/object/instance/receiver (these
are synonyms), right of it the name of a method routine that conceptually 
the receiver is
supposed to look up and invoke on behalf of the programmer. If the invoked 
method routine
returns a result one can immediately send it a message too, if needed.

  * At the end of the program you see an ooRexx directive led in by the 
double-colons, in this case
the "requires" directive. The ooRexx interpreter will first syntax check 
the entire REXX program
and if no syntax errors were found it will proceed carrying out all 
directives, in this case it
will call the ooRexx program named UNO.CLS which is a package of useful 
public routines and
public ooRexx classes to ease interfacing with OpenOffice/LibreOffice. 
After all directives got
carried out by the interpreter the execution of the program starts having 
all resources
available at that point in time that got brought in by the directives.

  o "UNO" is the acronym for "universal network objects" (cf.
) the c++ 

Ad programming features (Re: ... Re: Top 8 Reasons for using Python instead of REXX for z/OS

2022-01-07 Thread Rony G. Flatscher
On 07.01.2022 01:47, David Crayford wrote:
> Here is my list of must haves for a scripting language. Does REXX or ooRexx 
> meet the requirements?
>
> 1. Short circuit evaluation
> 2. Functions as first class objects
> 3. Mutli-threading
> 4. Dynamically typed, preferably with type hints
> 5. co-routintes
> 6. A module system
> 7. Support for object oriented programming
> 8. Regular expressions
> 9. Libraries for web programming, pegs, JSON/YAML parsing etc

You also mentioned in your follow up: "Forgot to mention. Support for 
functional programming map,
reduce, filter etc."

This list reads a little bit like a wish list for concepts found in different 
programming languages.
Sometimes such features are specific for a particular language (e.g. functional 
programming) and
then sometimes made available in other languages.

Such a list of somewhat useful features is never complete as one can add 
concepts found in different
languages that may prove helpful for certain kinds of problems, e.g.

  * easy to be employed as a macro language for COBOL, C++, Java et.al. 
applications
  * true multiple inheritance
  * messages as FCO (first class objects)
  * unknown message interception mechanism
  * message relaying mechanism
  * built-in security manager that really secures execution of programs
  * metaprogramming (writing programs in the programming language at runtime 
and then execute them)
  * first order predicates with inferral engine
  * ...

A single language that incorporates all of these features (and adds any new 
future features) will
turn "inhuman" quite quickly with different kinds of problems for programmers 
and programs they create.

A probably more appropriate, safer solution in many cases is to have a tool box 
with different
programming languages/libraries excelling in specific abilities and 
instrumentate/integrate all of
them with an easy to learn, easy to understand and easy to use programming 
language creating control
scripts/programs.

Back to your question about support of the mentioned features (yours and the 
ones I added and
possibly the ones other are able to add as well) in ooRexx: as René mentioned, 
yes, ooRexx supports
almost all of them for any practical reason, either directly, in addition 
exploiting all of Java
including its functional programming model via an ooRexx function package or in 
experimental ooRexx
extensions to the ooRexx language. :)

But note, the paramount point here is: keep the functionality confined, 
safe=easy to use and easy to
understand and to maintain, self-documented as much as possible.

---rony



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


IntelliJ: adding REXX syntax highlighting and generating REXX documentation ... (Re: ... Re: Top 8 Reasons for using Python instead of REXX for z/OS

2022-01-05 Thread Rony G. Flatscher
As you mention IntelliJ to be used in your shop it may be interesting to know 
that there is an
IntelliJ plugin that is capable of doing syntax highlighting for REXX and 
ooRexx 5.

Overall the plugin is quite a nice REXX productivity tool available for 
IntelliJ and among other
things it makes it easy to copy syntax highlighted REXX code via the clipboard 
into slides or word
processors.

As mainframe REXX got frozen in time there are characters in use that TRL2 
(Mike Cowlishaw's "The
Rexx Language, 2nd edition") and ANSI REXX do not define and which therefore 
get flagged as errors
by the plugin by default. However, to support mainframe REXXers the plugin 
author, Alexander Seik (a
former student), allows for a setting that makes these characters valid 
characters for REXX symbols
(after installing this plugin into IntelliJ go to Settings -> Languages & 
Frameworks -> ooRexx ->
check 'Allow special characters (@,#,¢*,*$)').

Links:

  * Latest version of the IntelliJ Plugin, version 2.10 (uploaded last week):

,
 cf. the
readme.txt displayed at that page for instructions on how to install the 
plugin
  * IntelliJ: 

---rony

P.S.: As a little aside, the plugin makes also the feature available to create 
on-the-fly  automatic
HTML documentation from "ooRexxDoc" comments (block comments that start with 
"/**", note the second
asterisk immediately following the open block comment, which cause all of the 
comment to be included
in the generated documentation inspired by the javadoc system) of one ore more 
(maybe
interdependent) REXX programs (just do a right mouse click and pick the menu 
item "Quick Create
'ooRexxDoc' documentation", add the REXX scripts for which documentation should 
be generated). You
may want to look up Alexander Seik's presentation entitled 'The Cross-Platform 
Utility "ooRexxDoc"'
: 


On 05.01.2022 03:47, David Crayford wrote:
> It's true. The company I work for has been on-boarding millennials for years 
> now to replace the
> guys that are retiring. I work with some very smart young guys, some of who 
> write systems level
> code. None of them use REXX unless it's used in a product they are working 
> on. We're ripping and
> replacing decades old build tools written in REXX with Python because it's 
> become technical debt
> and no one can support it.
>
> The typical millenial uses:
>
>  * An IDE such as VS Code, IntelliJ, Slickedit with plugins for
>    mainframe languages and to access the MVS file system.
>  * They don't use TSO or the ISPF editor so there is no need for REXX
>    edit macros etc. ISPF is mainly used for SDSF and submitting jobs.
>  * They work in a interactive shell and use UNIX utilties.
>  * Everything is stored in Git repositories.
>  * They code scripts in Python, Node.js or a JVM language.
>
>
>
> On 5/1/22 10:06 am, Seymour J Metz wrote:
>> That's David Crayford, not me. I have no basis to either confirm or 
>> contradict. It's unfortunate
>> if true.
>>
>>
>> -- 
>> Shmuel (Seymour J.) Metz
>> http://mason.gmu.edu/~smetz3
>>
>> 
>> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
>> Bob Bridges
>> [robhbrid...@gmail.com]
>> Sent: Tuesday, January 4, 2022 9:03 PM
>> To: IBM-MAIN@LISTSERV.UA.EDU
>> Subject: Re: ... Re: Top 8 Reasons for using Python instead of REXX for z/OS
>>
>> Shmuel, I'm interested (and perhaps a little dismayed) at your third point.  
>> I've gotten the
>> impression, from reading ads about job openings, that REXX programmers 
>> aren't very thick on the
>> ground even at IBM where you'd think it'd be pretty easy to find them.  But 
>> "shrinking by the
>> day"?  Where do you get that?  I'm not disagreeing -- I have no data -- but 
>> have you?
>>
>> ---
>> Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313
>>
>> /* Genuine tragedies in the world are not conflicts between right and wrong. 
>>  They are conflicts
>> between two rights.  -Georg Hegel */
>>
>> -Original Message-
>> From: IBM Mainframe Discussion List  On Behalf Of 
>> David Crayford
>> Sent: Tuesday, January 4, 2022 19:23
>>
>>   1. IBM are too busy porting contemporary languages like Python, Golang
>>  and Node.js
>>   2. No vendor will port ooRexx because there is no market for it that is
>>  willing to pay support
>>   3. The pool of REXX developers is shrinking by the day and no young
>>  people want to learn it unless they have to 


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: ... Re: Top 8 Reasons for using Python instead of REXX for z/OS

2022-01-04 Thread Rony G. Flatscher
eeded on
Windows, if programming with ooRexx 32-bit installations of MS-Office, but also 
programming with
ooRexx 64-bit Windows applications). Another scenario is to test new versions 
of ooRexx 5.0 without
a need to uninstall a currently installed (older) ooRexx 5.0 (the official 
ooRexx site has
installers for ooRexx for the different operating system platforms).

Using this feature I experimented creating portable ooRexx interpreters for my 
students, such that
they can get to run ooRexx without a need to install. If interested/curious you 
could download this
portable ooRexx 5.0 for Windows in 32- and 64-bit as well as 64-bit for Linux 
and (universal/fat)
MacOS temporarily from my dropbox link:
<https://www.dropbox.com/sh/n65twckpkixl9gm/AADrnjgHAqiWQQU17GjGrtpna?dl=0> (I 
store it on an USB
stick and can run ooRexx off the stick, c.f. "readme.txt" after unzipping it):

06.12.2021  17:13 1 833 355 
ooRexx-5.0.0-darwin64-r12337-universal-portable-release-runtime.zip
06.12.2021  17:1311 446 419 
ooRexx-5.0.0-darwin64-r12337-universal-portable-release.zip
06.12.2021  17:01 1 419 744 
ooRexx-5.0.0-linux64-r12337-x86_64-portable-release-runtime.zip
06.12.2021  17:0111 022 325 
ooRexx-5.0.0-linux64-r12337-x86_64-portable-release.zip
06.12.2021  14:27 1 438 926 
ooRexx-5.0.0-win32-r12337-x86_32-portable-release-runtime.zip
06.12.2021  14:2721 010 496 
ooRexx-5.0.0-win32-r12337-x86_32-portable-release.zip
06.12.2021  14:46 1 635 798 
ooRexx-5.0.0-win64-r12337-x86_64-portable-release-runtime.zip
06.12.2021  14:4621 211 652 
ooRexx-5.0.0-win64-r12337-x86_64-portable-release.zip

Note: the zip archives labeled with"runtime" do not contain samples and 
documentation.

> And I've never heard about ooREXX being available on z/OS.  How do you manage 
> that?  Color me interested.
Best to give you the links for the tutorial (using ooRexx on the mainframe to 
interface with DB2)
written by Paul Dunkley:

  * either: 
<https://sourceforge.net/p/bsf4oorexx/mailman/search/?q=jdbc+tutorial=250>
  * or directly:
  o Part 1: <https://sourceforge.net/p/bsf4oorexx/mailman/message/35565829/>
  o Part 2: <https://sourceforge.net/p/bsf4oorexx/mailman/message/35773359/>
  o Part 3: <https://sourceforge.net/p/bsf4oorexx/mailman/message/35894589/>
  o Part 4: <https://sourceforge.net/p/bsf4oorexx/mailman/message/35966208/>
  o Part, Interim Note: 
<https://sourceforge.net/p/bsf4oorexx/mailman/message/36164161/>
  o Part 5: <https://sourceforge.net/p/bsf4oorexx/mailman/message/36183882/>

HTH,

---rony

> /* The early bird may get the worm, but the second mouse gets the cheese. */
>
> -Original Message-
> From: IBM Mainframe Discussion List  On Behalf Of 
> Rony G. Flatscher
> Sent: Monday, January 3, 2022 09:02
>
> My name is Rony G. Flatscher and I have been working as an IS professor at a 
> European Business university (WU Vienna) who has acquired quite a bit of 
> experience in teaching BA students programming for the past 35 years. Over 
> the course of the years I taught e.g. COBOL, BASIC, Pascal, Open Access 
> Programmer, C/C++, VBS (Visual Basic), VBA (Visual Basic for Applications), 
> Java, and tested one semester REXX with a very surprising effect: the BA 
> students can learn programming much faster in REXX than in any other 
> programming language (including Python taught by colleagues)!
>
> The secret lies in employing Object REXX for teaching as it includes 
> structures/types and the powerful message paradigm in addition to all of the 
> classic REXX capabilities. In a four hour lecture these BA students (some 
> total newbies, some already with programming skills) learn REXX and then the 
> object oriented concepts/features of Object REXX in a single semester (four 
> months).
>
> In the middle of the semester (after two months), they not only are able to 
> create simple programs in REXX and Object REXX, but taking advantage of the 
> COM/OLE library on Windows that comes with the Windows version of Object 
> REXX. This empowers them to interface/program the Windows shell and any 
> Windows application with an OLE interface including all of MS Office using 
> Object REXX only! It is impressive to see how quickly they become empowered 
> to exploit MS Excel or MS Word for their needs with Object REXX!
>
> At the end of the semester (after another two months), using an Object REXX 
> library that makes accessing Java possible from Object REXX, these very same 
> BA (business administration) students have been empowered writing Object REXX 
> programs to create GUIs (graphical user interface programs using awt, swing 
> and later JavaFX), create client-server socket programs (including SSL/TLS), 
> parse XML text 

... Re: Top 8 Reasons for using Python instead of REXX for z/OS

2022-01-03 Thread Rony G. Flatscher
My name is Rony G. Flatscher and I have been working as an IS professor at a 
European Business
university (WU Vienna) who has acquired quite a bit of experience in teaching 
BA students
programming for the past 35 years. Over the course of the years I taught e.g. 
COBOL, BASIC, Pascal,
Open Access Programmer, C/C++, VBS (Visual Basic), VBA (Visual Basic for 
Applications), Java, and
tested one semester REXX with a very surprising effect: the BA students can 
learn programming much
faster in REXX than in any other programming language (including Python taught 
by colleagues)!

The secret lies in employing Object REXX for teaching as it includes 
structures/types and the
powerful message paradigm in addition to all of the classic REXX capabilities. 
In a four hour
lecture these BA students (some total newbies, some already with programming 
skills) learn REXX and
then the object oriented concepts/features of Object REXX in a single semester 
(four months).

In the middle of the semester (after two months), they not only are able to 
create simple programs
in REXX and Object REXX, but taking advantage of the COM/OLE library on Windows 
that comes with the
Windows version of Object REXX. This empowers them to interface/program the 
Windows shell and any
Windows application with an OLE interface including all of MS Office using 
Object REXX only! It is
impressive to see how quickly they become empowered to exploit MS Excel or MS 
Word for their needs
with Object REXX!

At the end of the semester (after another two months), using an Object REXX 
library that makes
accessing Java possible from Object REXX, these very same BA (business 
administration) students have
been empowered writing Object REXX programs to create GUIs (graphical user 
interface programs using
awt, swing and later JavaFX), create client-server socket programs (including 
SSL/TLS), parse XML
text files with SAX and DOM, interface/program Apache OpenOffice and 
LibreOffice all with Object
REXX only.

And the best about this is, because of using Java class libraries from Object 
REXX, there is no need
to a) learn the Java programming language oneself and b) all Object REXX 
programs run unchanged on
Windows, Linux and MacOS including GUI Object REXX programs!

To get so far in teaching programming skills at a Business university in a 
single semester (only a
four hour lecture) has become possible with Object REXX, it would not be 
possible with any other
programming language I know of for reasons, that have mostly to do with the 
"human oriented"
philosophy of the REXX programming language (set forth by its father Mike F. 
Cowlishaw) which also
has been an important guiding principle when IBM developed Object REXX. This 
translates into
becoming able to quickly learn the programming language Object REXX which also 
means that it is a
rather cheap (cost effective) to learn programming language compared to 
learning many other
programming languages!

IBM and the REXX Language assocation (https://www.rexxla.org) entered into 
successful negotiations
to hand over the source code of the IBM product Object REXX and since about 15 
years there is an
"open object Rexx (ooRexx, oorexx)" interpreter with source code that has been 
constantly
maintained, developed further and that gets released by RexxLA.

There have been also IBM mainframe shops that have started to use ooRexx on 
mainframes in the meantime.

The purpose of this message is to draw your attention to a great REXX 
programming language,
originally developed by IBM, open sourced by RexxLA, and as a result available 
for all important
operating systems. ooRexx can be a great "SAK" (swiss army knife) tool for any 
REXX programmer!
(ooRexx can run rings around many other programming languages including Python.)

But before being able to take advantage of ooRexx at all one needs to learn 
about its existence in
the first place, hence this post. Here are two short articles which you might 
find helpful in this
context (download link at the top left hand corner):

- An introduction to REXX and ooRexx: Resurrecting REXX, Introducing Object 
Rexx (2006),
<https://epub.wu.ac.at/8118/>

- "Business Programming" – Critical Factors from Zero to Portable GUI 
Programming in Four Hours
(2021), <https://epub.wu.ac.at/8425/>

---rony

P.S.: It is not uncommon that students who use Linux start to replace their 
shell scripts with Rexx
scripts as this is much easier and much more powerful after having learned 
Rexx/ooRexx.


-- 
__________

Prof. Dr. Rony G. Flatscher
Department Wirtschaftsinformatik und Operations Management
Institut für Wirtschaftsinformatik und Gesellschaft
D2c 2.086
WU Wien
Welthandelsplatz 1
A-1020  Wien/Vienna, Austria/Europe

http://www.wu.ac.at
__

---

... Re: Top 8 Reasons for using Python instead of REXX for z/OS

2022-01-03 Thread Rony G. Flatscher
My name is Rony G. Flatscher and I have been working as an IS professor at a 
European Business university (WU Vienna) who has acquired quite a bit of 
experience in teaching BA students programming for the past 35 years. Over the 
course of the years I taught e.g. COBOL, BASIC, Pascal, Open Access Programmer, 
C/C++, VBS (Visual Basic), VBA (Visual Basic for Applications), Java, and 
tested one semester REXX with a very surprising effect: the BA students can 
learn programming much faster in REXX than in any other programming language 
(including Python taught by colleagues)!

The secret lies in employing Object REXX for teaching as it includes 
structures/types and the powerful message paradigm in addition to all of the 
classic REXX capabilities. In a four hour lecture these BA students (some total 
newbies, some already with programming skills) learn REXX and then the object 
oriented concepts/features of Object REXX in a single semester (four months).

In the middle of the semester (after two months), they not only are able to 
create simple programs in REXX and Object REXX, but taking advantage of the 
COM/OLE library on Windows that comes with the Windows version of Object REXX. 
This empowers them to interface/program the Windows shell and any Windows 
application with an OLE interface including all of MS Office using Object REXX 
only! It is impressive to see how quickly they become empowered to exploit MS 
Excel or MS Word for their needs with Object REXX!

At the end of the semester (after another two months), using an Object REXX 
library that makes accessing Java possible from Object REXX, these very same BA 
(business administration) students have been empowered writing Object REXX 
programs to create GUIs (graphical user interface programs using awt, swing and 
later JavaFX), create client-server socket programs (including SSL/TLS), parse 
XML text files with SAX and DOM, interface/program Apache OpenOffice and 
LibreOffice all with Object REXX only. 

And the best about this is, because of using Java class libraries from Object 
REXX, there is no need to a) learn the Java programming language oneself and b) 
all Object REXX programs run unchanged on Windows, Linux and MacOS including 
GUI Object REXX programs!

To get so far in teaching programming skills at a Business university in a 
single semester (only a four hour lecture) has become possible with Object 
REXX, it would not be possible with any other programming language I know of 
for reasons, that have mostly to do with the "human oriented" philosophy of the 
REXX programming language (set forth by its father Mike F. Cowlishaw) which 
also has been an important guiding principle when IBM developed Object REXX. 
This translates into becoming able to quickly learn the programming language 
Object REXX which also means that it is a rather cheap (cost effective) to 
learn programming language compared to learning many other programming 
languages! 

IBM and the REXX Language assocation (https://www.rexxla.org) entered into 
successful negotiations to hand over the source code of the IBM product Object 
REXX and since about 15 years there is an "open object Rexx (ooRexx, oorexx)" 
interpreter with source code that has been constantly maintained, developed 
further and that gets released by RexxLA. 

There have been also IBM mainframe shops that have started to use ooRexx on 
mainframes in the meantime.

The purpose of this message is to draw your attention to a great REXX 
programming language, originally developed by IBM, open sourced by RexxLA, and 
as a result available for all important operating systems. ooRexx can be a 
great "SAK" (swiss army knife) tool for any REXX programmer! (ooRexx can run 
rings around many other programming languages including Python.) 

But before being able to take advantage of ooRexx at all one needs to learn 
about its existence in the first place, hence this post. Here are two short 
articles which you might find helpful in this context (download link at the top 
left hand corner): 

- An introduction to REXX and ooRexx: Resurrecting REXX, Introducing Object 
Rexx (2006), <https://epub.wu.ac.at/8118/>

- "Business Programming" – Critical Factors from Zero to Portable GUI 
Programming in Four Hours (2021), <https://epub.wu.ac.at/8425/> 

---rony

P.S.: It is not uncommon that students who use Linux start to replace their 
shell scripts with Rexx scripts as this is much easier and much more powerful 
after having learned Rexx/ooRexx.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN