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

2024-04-24 Thread Seymour J Metz
While there is automatic upper casing for TSO command and subcommand names, 
there are still plenty of cases ;-) where case matters. Consider generating 
SYSIN for an IBM service aid or utility. Or generating edit subcommands with 
case-sensitive operands.

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


From: IBM Mainframe Discussion List  on behalf of Jon 
Perryman 
Sent: Monday, April 22, 2024 5:02 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX vs other languages WAS: Rexx numeric digits and scientific 
notation question

On Mon, 22 Apr 2024 14:01:23 +, Seymour J Metz  wrote:

>delete foo
>rather than
>'DELETE' foo
>is a simple example. In practise I often need multiple upper case constants in 
>a single expression.

This isn't a valid example because 'delete' will also work. As Andrew said, 
rarely will you find a real need for REXX to uppercase an undefined REXX 
variable name. All parsers handle uppercase as needed. In this case, you're 
ignoring the TSO parser. Consider "alloc dsn('my.dataset') 
path('/my/unix/file')" where everything is specified in lowercase. Lowercase 
TSO commands, command option names, DSN and more are not valid. In this 
example, everthing except '/my/unix/file' will be automatically uppercased 
instead of failing the command because of lowercase.

Truthfully, REXX uppercasing rarely provides real advantages for most z/OS 
environments and is a problem for z/OS Unix where lowercase is the norm.

--
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


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

2024-04-24 Thread Seymour J Metz
De gustibus. To me the sparse form looks clearer.

Yes, if you refrain from assigning a value to delete then these are equivalent:

delete  foo
'DELETE' foo
'DELETE 'foo
'DELETE ' || foo

Note that abuttal with separating blanks yields a single blank; if you want 
multiple blanks then you must use, e.g., a literal.

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


From: IBM Mainframe Discussion List  on behalf of 
Andrew Rowley 
Sent: Monday, April 22, 2024 8:59 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX vs other languages WAS: Rexx numeric digits and scientific 
notation question

On 23/04/2024 12:01 am, Seymour J Metz wrote:
> delete foo
>
> rather than
>
> 'DELETE' foo
>
> is a simple example. In practise I often need multiple upper case constants 
> in a single expression.

In this example, delete *looks like* an instruction rather than a
variable - the fact that it is a variable is likely to surprise people.

It seems to be setting up for a problem like:

if  then
delete = 'yes'
...
if delete = yes then
 delete foo

If I understand your example correctly,
delete foo
concatenates the values of the variable delete (which is 'DELETE' if
hasn't been initialized) and foo, inserting an implied blank between
them, then passes the result to an environment set up previously with an
ADDRESS statement?

This is what I want to avoid using SIGNAL ON NOVALUE.

To me, it is much clearer to be explicit, including the concatenation, e.g.
"DELETE " || foo
seems much clearer about exactly what is happening/expected, which are
variables and which are (expected to be) constant etc.

--
Andrew Rowley
Black Hill Software

--
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


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

2024-04-23 Thread Jeremy Nicoll
On Tue, 23 Apr 2024, at 11:25, Rony G. Flatscher wrote:

> 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.

I find it usually depends on whether I'm building error messages
from fragmentary values & phrases, when something like

   errmsg = funcname atline part1 part2

seems clear enough to me, and (eg) building filenames when
I'm likely to use eg

 fyle = dq || frm || "\" || mac || "\" || "no.such" || dq /* test - 
leafname error */
 fyle = dq || frm || "\" || mac || "FAIL\" || "ok.txt"  || dq /* test - 
path error */

 fyle = dq || frm || "\" || mac || "\" || "ok.txt"  || dq /* should 
work */
 
I usually put literal single or double quotes into vars named sq & dq, as I 
find it easier not to see quotes which are part of a final value jumbled up
with those that need to be around literals ... and I don't like mixing "'" & 
'"' on one line of code.


Also - as you'll see if you read this in a monospace font - I tend to space
out parts of /sets/ of related statements like the ones above so that one
can see they all do the same thing, ie I don't write

 fyle = dq || frm || "\" || mac || "\" || "no.such" || dq
 fyle = dq || frm || "\" || mac || "FAIL\" || "ok.txt" || dq

 fyle = dq || frm || "\" || mac || "\" || "ok.txt" || dq
 

I almost never space-out parameters on function calls, but sometimes 
do, eg the space after c2x(   and those before the final closing bracket
in these lines

op = op c2x( "basic vb vbs"copies(" ", 10 + gutr)  "built-in:  pqr"   )
op = op c2x( "html"copies(" ", 23 + gutr)  "built-in:  stuv"  )
op = op c2x( "perl"copies(" ", 25 + gutr)  "mine:  perl"  )
op = op c2x( "plain text"  copies(" ", 15 + gutr)  "mine:  plaintext" )
op = op c2x( "shell scripts"   copies(" ", 11 + gutr)  "mine:  shellscrp" )

- which is building a string of values each 'word' of which is a phrase,
in hex so that it can be passed somewhere & hacked apart easily. The
copies() calls are because I'm stretching the middle of each phrase so
that the texts (regrettably going to be displayed in a proportional
font) will still more or less be presented in sensible columns - tabs
don't work in the target application.

Sometimes I choose space concatenation or || in different parts of
a long expression because I think (with syntax colouring & vertical 
alignment) one's eye is drawn to different sections of the whole 
expression according to how the ||-delimited bits are syntax-
coloured.

Here, || shows up in bright yellow on a black background so
tends to draw attention to what's near it.


-- 
Jeremy Nicoll - my opinions are my own.

--
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-23 Thread Eric Rossman
I rather prefer the 'A '||B format because it makes it very clear that I'm 
doing string concatenation. I use the same construct in other languages.

REXX
C = 'A '||B

Python and Java
C = "A " + B

Bash
C = "A "
C += B

Etc.

I don't know of any (normal) language where whitespace is important. I don't 
care for the fact that two (almost identical) lines give different results:

B = 'B';
C = 'A ' B;
SAY 'C = "'||C||'"';
C = 'A '||B;
SAY 'C = "'||C||'"';
C = 'A ' || B;
SAY 'C = "'||C||'"';

Gives two blanks between A and B in the first case and just one in the second 
two cases.

FWIW, the difference between SUBWORD and PARSE isn't nearly as large as you 
would think.

On z/OS, PARSE VAR completed a little over 6% more interations (13 million vs 
12.3 million)
PARSE VAR A . . X .
Ran 30.00 seconds and completed 13041893 iterations.

X = SUBWORD( A, 3 )
Ran 30.00 seconds and completed 12300937 iterations.

On Windows, PARSE VAR completed a little over 7% more interations (44 million 
vs 41 million)
PARSE VAR A . . X .
Ran 30.00 seconds and completed 44698913 iterations.

X = SUBWORD( A, 3 )
Ran 30.00 seconds and completed 41597318 iterations.

Eric Rossman

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Paul Gilmartin
Sent: Tuesday, April 23, 2024 10:42 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: [EXTERNAL] Re: REXX vs other languages WAS: Rexx numeric digits and 
scientific notation question

On Tue, 23 Apr 2024 14:07:05 +, Schmitt, Michael wrote:

>You lost me when you say that rather than embrace the conventions, standards, 
>and features of the language I'm coding in (REXX), I should restrict it to the 
>limitations of other languages.
>
Did I say that?  I was trying to take a middle ground.

>The maxim is to assume that readers of your code are familiar with the 
>language you're coding in, and would expect your code to follow those 
>conventions. It would /defy/ their expectations to code otherwise.
>
Be sparse and elegant but not rococo.  I prefer:
'A' B
to (the equivalent):
'A ' || B
The latter seems to cater to the expectations of PL/I or some other language.

But I confess to an obsession with performance.  Function call/return is 
costly, so I'll use:
PARSE VAR A . . X .
rather than (the sparser?):
X = SUBWORD( A, 3 )


>-Original Message-
>From: Paul Gilmartin
>Sent: Monday, April 22, 2024 8:56 PM
>To: IBM-MAIN@LISTSERV.UA.EDU
>
>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
>>seems much clearer about exactly what is happening/expected, which are 
>>variables and which are (expected to be) constant etc.
>>
>That overkill is apt to confuse a POSIX shell partisan who would see 
>the blank as part of the command name and expect a failure such as:
>813 $ 'rm ' foo
>-bash: rm : command not found
>814 $
>
>The maxim is assume your readers have a moderate, not advanced, 
>knowledge of the language and make little concession to conventions of 
>other languages.  Don't:
>'DELETE' || ' ' || value( 'foo' )
>
>My stumbling block learning Shell was excessive familiarity with CMS, 
>where command strings built by Rexx  are parsed again by SVC 202.  I 
>tried to build command strings with sh to pass to a nonexistent 
>subsequent parser.  I got better in a couple days.

--
gil

--
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


Re: REXX vs other languages

2024-04-23 Thread Robin Vowels

On 2024-04-24 00:41, Paul Gilmartin wrote:

On Tue, 23 Apr 2024 14:07:05 +, Schmitt, Michael wrote:

Be sparse and elegant but not rococo.  I prefer:
'A' B
to (the equivalent):
'A ' || B
The latter seems to cater to the expectations of PL/I or some other 
language.


Catenation with || is PL/I and other languages.

But I confess to an obsession with performance.  Function call/return 
is

costly,


Catenation can be costly, because either or both operands need to be 
moved.

In XPL, both operands are moved, except when the first operand
is at the top of the free area.


so I'll use:
PARSE VAR A . . X .
rather than (the sparser?):
X = SUBWORD( A, 3 )


--
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-23 Thread Paul Gilmartin
On Tue, 23 Apr 2024 14:07:05 +, Schmitt, Michael wrote:

>You lost me when you say that rather than embrace the conventions, standards, 
>and features of the language I'm coding in (REXX), I should restrict it to the 
>limitations of other languages.
>
Did I say that?  I was trying to take a middle ground.

>The maxim is to assume that readers of your code are familiar with the 
>language you're coding in, and would expect your code to follow those 
>conventions. It would /defy/ their expectations to code otherwise.
>
Be sparse and elegant but not rococo.  I prefer:
'A' B
to (the equivalent):
'A ' || B
The latter seems to cater to the expectations of PL/I or some other language.

But I confess to an obsession with performance.  Function call/return is
costly, so I'll use:
PARSE VAR A . . X .
rather than (the sparser?):
X = SUBWORD( A, 3 )


>-Original Message-
>From: Paul Gilmartin
>Sent: Monday, April 22, 2024 8:56 PM
>To: IBM-MAIN@LISTSERV.UA.EDU
>
>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
>>seems much clearer about exactly what is happening/expected, which are
>>variables and which are (expected to be) constant etc.
>>
>That overkill is apt to confuse a POSIX shell partisan who would
>see the blank as part of the command name and expect a
>failure such as:
>813 $ 'rm ' foo
>-bash: rm : command not found
>814 $
>
>The maxim is assume your readers have a moderate, not
>advanced, knowledge of the language and make little
>concession to conventions of other languages.  Don't:
>'DELETE' || ' ' || value( 'foo' )
>
>My stumbling block learning Shell was excessive familiarity
>with CMS, where command strings built by Rexx  are parsed
>again by SVC 202.  I tried to build command strings with sh
>to pass to a nonexistent subsequent parser.  I got better in
>a couple days.

-- 
gil

--
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-23 Thread Schmitt, Michael
You lost me when you say that rather than embrace the conventions, standards, 
and features of the language I'm coding in (REXX), I should restrict it to the 
limitations of other languages.

The maxim is to assume that readers of your code are familiar with the language 
you're coding in, and would expect your code to follow those conventions. It 
would /defy/ their expectations to code otherwise.

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Paul Gilmartin
Sent: Monday, April 22, 2024 8:56 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX vs other languages WAS: Rexx numeric digits and scientific 
notation question

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
>seems much clearer about exactly what is happening/expected, which are
>variables and which are (expected to be) constant etc.
>
That overkill is apt to confuse a POSIX shell partisan who would
see the blank as part of the command name and expect a
failure such as:
813 $ 'rm ' foo
-bash: rm : command not found
814 $

The maxim is assume your readers have a moderate, not
advanced, knowledge of the language and make little
concession to conventions of other languages.  Don't:
'DELETE' || ' ' || value( 'foo' )

My stumbling block learning Shell was excessive familiarity
with CMS, where command strings built by Rexx  are parsed
again by SVC 202.  I tried to build command strings with sh
to pass to a nonexistent subsequent parser.  I got better in
a couple days.

--
gil

--
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


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-22 Thread Andrew Rowley

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.



--
Andrew Rowley
Black Hill Software

--
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-22 Thread Paul Gilmartin
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
>seems much clearer about exactly what is happening/expected, which are
>variables and which are (expected to be) constant etc.
> 
That overkill is apt to confuse a POSIX shell partisan who would
see the blank as part of the command name and expect a
failure such as:
813 $ 'rm ' foo
-bash: rm : command not found
814 $ 

The maxim is assume your readers have a moderate, not
advanced, knowledge of the language and make little
concession to conventions of other languages.  Don't:
'DELETE' || ' ' || value( 'foo' )

My stumbling block learning Shell was excessive familiarity
with CMS, where command strings built by Rexx  are parsed
again by SVC 202.  I tried to build command strings with sh
to pass to a nonexistent subsequent parser.  I got better in
a couple days.

-- 
gil

--
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-22 Thread Andrew Rowley

On 23/04/2024 12:01 am, Seymour J Metz wrote:

delete foo

rather than

'DELETE' foo

is a simple example. In practise I often need multiple upper case constants in 
a single expression.


In this example, delete *looks like* an instruction rather than a 
variable - the fact that it is a variable is likely to surprise people.


It seems to be setting up for a problem like:

if  then
   delete = 'yes'
...
if delete = yes then
    delete foo

If I understand your example correctly,
delete foo
concatenates the values of the variable delete (which is 'DELETE' if 
hasn't been initialized) and foo, inserting an implied blank between 
them, then passes the result to an environment set up previously with an 
ADDRESS statement?


This is what I want to avoid using SIGNAL ON NOVALUE.

To me, it is much clearer to be explicit, including the concatenation, e.g.
"DELETE " || foo
seems much clearer about exactly what is happening/expected, which are 
variables and which are (expected to be) constant etc.


--
Andrew Rowley
Black Hill Software

--
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 -- EXECIO intuitiveness

2024-04-22 Thread Jon Perryman
On Mon, 22 Apr 2024 18:14:50 +, Farley, Peter  
wrote:

>From the testing I have done so far,
> My suspicion (untested) is that the Rexx script itself is automagically 
> converted to EBCDIC as the interpreter
> is reading it, so that the interpreter only sees EBCDIC text.

Default REXX input routines would include support for UNIX files which are 
encoded. It makes sense they would make this generic and support multiple 
character sets. Why force it to only support the default encoding?

> the z/OS Unix Rexx interpreter SAY command only writes in EBCDIC.  

On other Unix variants, STDOUT does not perform encoding and it is typically 
performed by the application (language support). Imagine the difficulty in 
translating characters but skipping terminal commands without understanding the 
intentions of the app.  I would expect z/OS Unix to be the same and It would 
make sense that it is EBCDIC.

SAY is often environment specific. Rexx provides exits that are user 
replaceable allowing common functionality to be environment specific.

--
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-22 Thread Jon Perryman
On Mon, 22 Apr 2024 14:01:23 +, Seymour J Metz  wrote:

>delete foo
>rather than
>'DELETE' foo
>is a simple example. In practise I often need multiple upper case constants in 
>a single expression.

This isn't a valid example because 'delete' will also work. As Andrew said, 
rarely will you find a real need for REXX to uppercase an undefined REXX 
variable name. All parsers handle uppercase as needed. In this case, you're 
ignoring the TSO parser. Consider "alloc dsn('my.dataset') 
path('/my/unix/file')" where everything is specified in lowercase. Lowercase 
TSO commands, command option names, DSN and more are not valid. In this 
example, everthing except '/my/unix/file' will be automatically uppercased 
instead of failing the command because of lowercase.

Truthfully, REXX uppercasing rarely provides real advantages for most z/OS 
environments and is a problem for z/OS Unix where lowercase is the norm.

--
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 -- EXECIO intuitiveness

2024-04-22 Thread Farley, Peter
From the testing I have done so far, the z/OS Unix Rexx interpreter SAY command 
only writes in EBCDIC.  My suspicion (untested) is that the Rexx script itself 
is automagically converted to EBCDIC as the interpreter is reading it, so that 
the interpreter only sees EBCDIC text.

On a “real ASCII” system I would expect ASCII hex output for that example.

Peter

From: IBM Mainframe Discussion List  On Behalf Of 
Paul Gilmartin
Sent: Monday, April 22, 2024 1:48 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX vs other languages -- EXECIO intuitiveness


On Mon, 22 Apr 2024 16:59:21 +, Farley, Peter wrote:

>

>I have recently done some experiments with Rexx scripts stored in the z/OS 
>Unix file system encoded in ASCII and they will execute without a problem so 
>long as the starting script file is properly ...

>

FSVO "properly".  What does "say c2x( 'abcd' )" show?  Is it the same on

a real ASCII system?



--

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.


--
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-22 Thread Seymour J Metz
I'm not the who encountered it. I'd love to see the trace i output.

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


From: IBM Mainframe Discussion List  on behalf of Jon 
Perryman 
Sent: Monday, April 22, 2024 1:45 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX vs other languages WAS: Rexx numeric digits and scientific 
notation question

On Mon, 22 Apr 2024 01:41:21 +, Seymour J Metz  wrote:

>I was referring to 'I once found CMS ISPF to reauire "address isredit 'isredit 
>'".
>Otherwise the command went to ISPEXEC.', which clearly is b0rk3n.

This seems very unlikely given that IBM does good QA and this would have caused 
a HYPER to fix it. This would have broken a lot of existing customer code. My 
gut tells me that ISREDIT was set causing it not to be "ISREDIT".

--
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


Re: REXX vs other languages -- EXECIO intuitiveness

2024-04-22 Thread Paul Gilmartin
On Mon, 22 Apr 2024 16:59:21 +, Farley, Peter wrote:
>
>I have recently done some experiments with Rexx scripts stored in the z/OS 
>Unix file system encoded in ASCII and they will execute without a problem so 
>long as the starting script file is properly ...
>
FSVO "properly".  What does "say c2x( 'abcd' )" show?  Is it the same on
a real ASCII system?

-- 
gil

--
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-22 Thread Jon Perryman
On Mon, 22 Apr 2024 01:41:21 +, Seymour J Metz  wrote:

>I was referring to 'I once found CMS ISPF to reauire "address isredit 'isredit 
>'".
>Otherwise the command went to ISPEXEC.', which clearly is b0rk3n.

This seems very unlikely given that IBM does good QA and this would have caused 
a HYPER to fix it. This would have broken a lot of existing customer code. My 
gut tells me that ISREDIT was set causing it not to be "ISREDIT".

--
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 -- EXECIO intuitiveness

2024-04-22 Thread Jeremy Nicoll
On Sun, 21 Apr 2024, at 04:58, Steve Thompson wrote:

> And so, with Windows I/O is different (still talking REXX), same 
> problem with Linux. I/O is not handled the same for simple reads 
> and writes from my perspective.

There's an EXECIO in ooREXX now, provided by the

  address hostemu

extension; the docs suggest it works in Windows & Unix/linux.  The
parameter after diskr/diskw is the whole taget filename, most likely
enclosed in quotes.

I've not tried it yet.

-- 
Jeremy Nicoll - my opinions are my own.

--
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 -- EXECIO intuitiveness

2024-04-22 Thread Paul Gilmartin
On Mon, 22 Apr 2024 16:59:21 +, Farley, Peter wrote:

>Practically speaking however, starting a Rexx script under one of the z/OS 
>Unix shell programs is pretty much the only way to get it done.  Although if 
>you use the BPXWUNIX() function from a TSO Rexx  script to start another Rexx 
>script stored in the z/OS Unix file system it might work.  I will have to try 
>that path out.
>

BPXWUNIX() runs a shell.


>I have recently done some experiments with Rexx scripts stored in the z/OS 
>Unix file system encoded in ASCII and they will execute without a problem so 
>long as the starting script file is properly tagged as ISO8859-1 text.  
>Untagged Rexx script files started from any z/OS Unix shell do have to be 
>encoded in EBCDIC though.
>
EBCDIC -- Who needs it!  suppose it's improperly tagged as ISO8859-1
text but writes UTF-8 strings to stdout?  Will they display nicely via ssh to
a UTF-8 desktop?

-- 
gil

--
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 -- EXECIO intuitiveness

2024-04-22 Thread Paul Gilmartin
On Mon, 22 Apr 2024 11:40:33 -0500, Jon Perryman wrote:
>
>I've never tried it but a shell should not be required to automatically 
>integrate REXX & UNIX as long as you start REXX using z/OS Unix facilities in 
>a Unix address space. Technically, shells are not required by Unix but I doubt 
>that it has been tested much for obscure requirements.
> 
From the ISPF command line I've run a '~'-aware exec that does
ADDRESS SYSCALL chdir  which changes the default
directory for 3.17, etc.

I suspect that spawn( <, ... ); would work likewise.
Available and default command environments TBD.

-- 
gil

--
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 -- EXECIO intuitiveness

2024-04-22 Thread Farley, Peter
Practically speaking however, starting a Rexx script under one of the z/OS Unix 
shell programs is pretty much the only way to get it done.  Although if you use 
the BPXWUNIX() function from a TSO Rexx  script to start another Rexx script 
stored in the z/OS Unix file system it might work.  I will have to try that 
path out.

I have recently done some experiments with Rexx scripts stored in the z/OS Unix 
file system encoded in ASCII and they will execute without a problem so long as 
the starting script file is properly tagged as ISO8859-1 text.  Untagged Rexx 
script files started from any z/OS Unix shell do have to be encoded in EBCDIC 
though.

Peter

From: IBM Mainframe Discussion List  On Behalf Of Jon 
Perryman
Sent: Monday, April 22, 2024 12:41 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX vs other languages -- EXECIO intuitiveness


On Sun, 21 Apr 2024 22:54:15 +, Seymour J Metz 
mailto:sme...@gmu.edu>> wrote:



>>Wait, what?  Are you saying TSO-REXXhaas LINEIN, CHAROUT and so on?



>Only in a EUnix environment. I don't know if syscalls is enough or if you 
>actually have t be running under the shell.



Syscalls does not setup a full z/OS Unix environment and in environments like 
TSO would only cause dubbing.



I've never tried it but a shell should not be required to automatically 
integrate REXX & UNIX as long as you start REXX using z/OS Unix facilities in a 
Unix address space. Technically, shells are not required by Unix but I doubt 
that it has been tested much for obscure requirements.

--



This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.


--
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 -- EXECIO intuitiveness

2024-04-22 Thread Jon Perryman
On Sun, 21 Apr 2024 22:54:15 +, Seymour J Metz  wrote:

>>Wait, what?  Are you saying TSO-REXXhaas LINEIN, CHAROUT and so on?

>Only in a EUnix environment. I don't know if syscalls is enough or if you 
>actually have t be running under the shell.

Syscalls does not setup a full z/OS Unix environment and in environments like 
TSO would only cause dubbing.

I've never tried it but a shell should not be required to automatically 
integrate REXX & UNIX as long as you start REXX using z/OS Unix facilities in a 
Unix address space. Technically, shells are not required by Unix but I doubt 
that it has been tested much for obscure requirements.

--
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-22 Thread Seymour J Metz
delete foo

rather than

'DELETE' foo

is a simple example. In practise I often need multiple upper case constants in 
a single expression.

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


From: IBM Mainframe Discussion List  on behalf of 
Andrew Rowley 
Sent: Sunday, April 21, 2024 10:00 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX vs other languages WAS: Rexx numeric digits and scientific 
notation question

On 22/04/2024 10:09 am, Seymour J Metz wrote:
> It shortens expressions, upper cases automatically and, IMHO, is more 
> readable.

Was that a reply about the usefulness of the default value being the
variable name, uppercase? If so, I still don't see it.

Can you give an example of how you would use it?

--
Andrew Rowley
Black Hill Software

--
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


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

2024-04-21 Thread Andrew Rowley

On 22/04/2024 10:09 am, Seymour J Metz wrote:

It shortens expressions, upper cases automatically and, IMHO, is more readable.


Was that a reply about the usefulness of the default value being the 
variable name, uppercase? If so, I still don't see it.


Can you give an example of how you would use it?

--
Andrew Rowley
Black Hill Software

--
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 -- EXECIO intuitiveness

2024-04-21 Thread Bob Bridges
Oh, Unix.  Sorry, you did say "OMVS", I just didn't pay attention.

---
Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313

/* The sad thing for us rationalists is that the vast majority of the human 
race would rather be told that "two and two is five and make no mistake about 
it" than "I think it is possible that two and two may be four.  -from The Stars 
in Their Courses by Isaac Asimov */

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Paul Gilmartin
Sent: Sunday, April 21, 2024 15:02

Not exactly: 

--- On Sun, 21 Apr 2024 14:54:33 -0400, Bob Bridges wrote:
>Wait, what?  Are you saying TSO-REXX has LINEIN, CHAROUT and so on?

--
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-21 Thread Seymour J Metz
I was referring to 'I once found CMS ISPF to reauire "address isredit 'isredit 
'".
Otherwise the command went to ISPEXEC.', which clearly is b0rk3n. My apologies 
for not making that clear.

As for "LEAVE = 'date'; LEAVE", it's perfectly valid but don't ever hand that 
in for a class I'm grading ;-)

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


From: IBM Mainframe Discussion List  on behalf of 
Paul Gilmartin <042bfe9c879d-dmarc-requ...@listserv.ua.edu>
Sent: Sunday, April 21, 2024 8:48 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX vs other languages WAS: Rexx numeric digits and scientific 
notation question

On Sun, 21 Apr 2024 23:02:56 +, Seymour J Metz wrote:

>Unclean! Did you report it as a bug?
>
I suspect it's WAD (BAD!)
o LEAVE as the target of an assignment is a variable name.
o Otherwise, LEAVE as the first token of an instruction
  is a keywod (LEAVE NAME)
o Otherwise, LEAVE is a symbol which may be a variable name.

For performance, Rexx gives high priority to detecting assignments.

Alas, them's the rules.  What would you report as a bug?
>
>
>From: Paul Gilmartin
>Sent: Sunday, April 21, 2024 11:50 AM
>
>Astonishment factor with such as "LEAVE = 'date'; LEAVE".  No
>Rexx syntax error, but unexpected result.

--
gil

--
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


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

2024-04-21 Thread Paul Gilmartin
On Sun, 21 Apr 2024 23:02:56 +, Seymour J Metz wrote:

>Unclean! Did you report it as a bug?
> 
I suspect it's WAD (BAD!)
o LEAVE as the target of an assignment is a variable name.
o Otherwise, LEAVE as the first token of an instruction
  is a keywod (LEAVE NAME)
o Otherwise, LEAVE is a symbol which may be a variable name.

For performance, Rexx gives high priority to detecting assignments.

Alas, them's the rules.  What would you report as a bug?
>
>
>From: Paul Gilmartin 
>Sent: Sunday, April 21, 2024 11:50 AM
>
>Astonishment factor with such as "LEAVE = 'date'; LEAVE".  No
>Rexx syntax error, but unexpected result.

-- 
gil

--
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-21 Thread Seymour J Metz
It shortens expressions, upper cases automatically and, IMHO, is more readable.

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


From: IBM Mainframe Discussion List  on behalf of 
Andrew Rowley 
Sent: Sunday, April 21, 2024 7:03 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX vs other languages WAS: Rexx numeric digits and scientific 
notation question

On 22/04/2024 1:19 am, Seymour J Metz wrote:

>   2. There is a decades-long argument about NOVALUE. I am in the camp that
>  believes the default behavior to be too useful to give up; others believe
>  that it is dangerous.

Genuine curiosity: what is the use of the default behaviour? I have
never been able to see anything particularly useful.

--
Andrew Rowley
Black Hill Software

--
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


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

2024-04-21 Thread Andrew Rowley

On 22/04/2024 1:19 am, Seymour J Metz wrote:


  2. There is a decades-long argument about NOVALUE. I am in the camp that
 believes the default behavior to be too useful to give up; others believe
 that it is dangerous.


Genuine curiosity: what is the use of the default behaviour? I have 
never been able to see anything particularly useful.


--
Andrew Rowley
Black Hill Software

--
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-21 Thread Seymour J Metz
Unclean! Did you report it as a bug?

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


From: IBM Mainframe Discussion List  on behalf of 
Paul Gilmartin <042bfe9c879d-dmarc-requ...@listserv.ua.edu>
Sent: Sunday, April 21, 2024 11:50 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX vs other languages WAS: Rexx numeric digits and scientific 
notation question

On Sun, 21 Apr 2024 15:19:40 +, Seymour J Metz  wrote:

>A few comments.
>
> 1. It's best to avoid names that a,e, or are similar to, keywords.
>
Astonishment factor with such as "LEAVE = 'date'; LEAVE".  No
Rexx syntax error, but unexpected result.

> 2. There is a decades-long argument about NOVALUE. I am in the camp that
>believes the default behavior to be too useful to give up; others believe
>that it is dangerous.
>
I'm inconsistent.  I routinely use SIGNAL ON NOVALUE.  It reports most of
my typos.  I very rarely use "set -o no''unset".  The difference may be due
sh marking variables with '$'.

> 3. T e default environment for statements that are expressions is often an
>application rater than the operating system, e.g., ISPEXEC, IISREDIT, 
> XEDIT.
>That behavior is incredibly useful.
>
Water is wet.  I once found CMS ISPF to reauire "address isredit 'isredit 
'".
Otherwise the command went to ISPEXEC.

--
gil

--
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


Re: REXX vs other languages

2024-04-21 Thread Seymour J Metz
I've seen code that does. I would never bless it in a code review.

To me the big advantage is that adding language features doesn't break existing 
code.

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


From: IBM Mainframe Discussion List  on behalf of 
Robin Vowels <054c2a8bb600-dmarc-requ...@listserv.ua.edu>
Sent: Sunday, April 21, 2024 11:52 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX vs other languages

On 2024-04-22 00:05, Seymour J Metz wrote:
> While PL/I has no reserved words, it is considered bad form to use a
> keyword as an entry or variable name. The same principle applies to
> Rexx; using, e.g., DO, ELSE, END, EXIT, IF, ITERATE, OTHERWISE,
> PROCEDURE, THEN, WHEN, as a variable name can make the code hard to
> read.

One would not use as variable such common keywords as mentioned above.

The real advantage is that one doesn't need to keep in mind
all those uncommonly-used words that might be used as variable names,

--
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


Re: REXX vs other languages -- EXECIO intuitiveness

2024-04-21 Thread Seymour J Metz
Only in a EUnix environment. I don't know if syscalls is enough or if you 
actually have t be running under the shell.

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


From: IBM Mainframe Discussion List  on behalf of Bob 
Bridges <0587168ababf-dmarc-requ...@listserv.ua.edu>
Sent: Sunday, April 21, 2024 2:54 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX vs other languages -- EXECIO intuitiveness

Wait, what?  Are you saying TSO-REXX has LINEIN, CHAROUT and so on?

...Although I do think EXECIO is nicely flexible.  Still, I find myself looking 
up the syntax occasionally when doing something unusual.

---
Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313

/* [Hitler] has grasped the falsity of the hedonistic attitude to life. Nearly 
all western thought since the last war, certainly all ‘progressive’ thought, 
has assumed tacitly that human beings desire nothing beyond ease, security and 
avoidance of pain. In such a view of life there is no room, for instance, for 
patriotism and the military virtuesHitler, because in his own joyless mind 
he feels it with exceptional strength, knows that human beings ~don’t~ want 
only comfort, safety, short working-hours, hygiene, birth-control and, in 
general, common sense; they also, at least intermittently, want struggle and 
self-sacrifice, not to mention drums, flags and loyalty-parades. However they 
may be as economic theories, Fascism and Nazism are psychologically far sounder 
than any hedonistic conception of life.  -George Orwell, reviewing _Mein Kampf_ 
in 1940. */

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Seymour J Metz
Sent: Sunday, April 21, 2024 10:40

Given that REXX in an OMVS environment supports ANSI stream I/O, why use EXECIO?

--- On Sat, 20 Apr 2024 23:58:18 -0400, Steve Thompson wrote:
>I concur about REXX EXECIO I/O is not exactly intuitive.

--
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


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

2024-04-21 Thread Seymour J Metz
There are languages with a covention that method names end in ain a question 
mark iff they are Boolean.

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


From: IBM Mainframe Discussion List  on behalf of 
Robert Prins <05be6ef5bfea-dmarc-requ...@listserv.ua.edu>
Sent: Saturday, April 20, 2024 4:17 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX vs other languages WAS: Rexx numeric digits and scientific 
notation question

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

Robert
--
Robert AH Prins
robert(a)prino(d)org
The hitchhiking grandfather 
<https://secure-web.cisco.com/1CjWWkCtcvllbYna0NsyMECv9i2KfIg00WW6Yy8zbPZbuqNVURWRkkaaDHPSxAZ_golJntB-q0HoHRO4xmjIcVfwgac8gvI2_6SvyVqMCVc8nBCtdx_vO5Q2Mb6qOHdTX83kueLEi2cvem-lpM8UaV0aAwBH0qnnPQiIkLMR7hQBTuXwhq3exW8ZbVHC0J7TTM99lPcVIHdaWP9pe4TrcXgvNwTNKYlBw0xERBl7b02W4mpZgIYGDK1U7nP3xwxQNr4_VOb62DMRnlwtO0arxMzQ7XmC0AUr_AdKYr9LOeWK-o1dHvssi8xa4dh2otNrGqpC7gYoPAmd4FYY9xmEKQFW9YA-PIT0WISlYisIhflCX8DxZSs0aSDaDZwahHyyHa2jShnC3TeZ843rDrfBSLR_W_28JfExRqzKVhvAuiO8/https%3A%2F%2Fprino.neocities.org%2Findex.html>
Some REXX code for use on z/OS
<https://secure-web.cisco.com/1I1tK-MrLJnt0WdLDboV4BPnAvrT6HOway_WfbqRc71O4DYwX2QLPhUWED3iBZa81UrJADr36HbN5u1g3jyqKmBv0piCOFmOc6V913K9OYEEK7V14Ajgt8KD2Jjp6Sg8cJeoCxWESkHKhhZPPwXA_SYdz6-rjucRjHv05hVgJcg41KJ4FbrnfmldqC9DiL0hLKy01Y7dnnLs2CfTHonsMyZna7cWIRmxTApIiNJWZHBWip2YcFhtM5igK5THcJdAebFyfX9CUhqaIF9YN3JkKHPWk2BlDfh8MRTi-MqTu1Q7QLx4yTLpBUNviYRakAswA5ODayfQgbq825wQLtOSw4-WO_rPdAKh5dYUGEnTEn4ihKiQTpDHCUQAc5k_xOEi-uMDQMqcUjPGceoDfu1yzCxtY0Orj__tLTGLTi0koDJE/https%3A%2F%2Fprino.neocities.org%2FzOS%2FzOS-Tools.html>

On Sat, 20 Apr 2024 at 15:08, Bob Bridges <
0587168ababf-dmarc-requ...@listserv.ua.edu> 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'.)
>
> -Original Message-
> From: IBM Mainframe Discussion List  On Behalf
> Of Andrew Rowley
> Sent: Friday, April 19, 2024 22:41
>
> It doesn't cause a problem except when it does. One danger is a typo in
> a variable name. When I wrote some complex Rexx I did use SIGNAL ON
> NOVALUE, but I wasn't totally appeased!
>
> --- On 20/04/2024 12:41 am, Rony G. Flatscher wrote:
> > 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 it or feel that it should not be allowed. ;) )
>

--
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


Re: REXX vs other languages -- EXECIO intuitiveness

2024-04-21 Thread Steve Thompson
I am looking at going OOREXX or NETREXX to make interfacing 
easier. I'm still researching how to proceed in the best way.


I have Regina Rexx on both W11 and Suse LEAP 15.x I've been 
struggling with I/O because I'm too used to DSN type file systems 
as opposed to char streams.


So I have to re-think an application when trying to implement it 
off mainframe. Most of what I do is based on/in record I/O. And 
having used COBOL (FJ) on Windows, it makes the data appear as 
record oriented from where I sit.


I'm assuming they went to a common forum. I haven't looked it up 
for while.


Steve Thompson

On 4/21/2024 1:11 AM, Paul Gilmartin wrote:

On Sat, 20 Apr 2024 23:58:18 -0400, Steve Thompson wrote:


I concur about REXX EXECIO I/O is not exactly intuitive.

REXX, first implemented in CMS used the CMS I/O utilities
Over in TSO they created EXECIO which does not operate in the
same way as does the CMS EXECIO. And it causes me headaches when
I work on CMS for a year or two and then come back to TSO to have
it NOT be have as it did in CMS. Especially the STEM variable and
trying to write a record.


Note the fundamental difference in file specs:
CMS:  FN FT FM
Z/OS: DDNAME
... but I have written portable EXECs -- on z/OS
my  FileSpec variable is one word; on CMS three.

And, irritatingly, the syntax of ADDRESS MVS EXECIO
differs depending on whether the EXEC is started from
a UNIX or non-UNIX address space.

The lack of (VAR string is probably impelled by TSO
RECFM=F, which would have a trailing blank entanglement.


And so after working in TSO for a year or so to go back to CMS --
I need to learn and make use of PIPEs which is not supported over
on TSO Most shops do not see the need to pay for TSO Pipes.
Sigh.


Is TSO Pipes even marketed except, an obsolete version
bundled with BatchPipes?


And so, with Windows I/O is different (still talking REXX), same
problem with Linux. I/O is not handled the same for simple reads
and writes from my perspective.


Files on desktop systems are largely character streams; on
mainframes, record oriented.  Beyond that, standard Rexx
stream I/O came late to CMS because developers economized
by using the available EXECIO.


Never-the-Less, I really appreciate REXX over EXEC, EXEC2 and CLIST.


Which Rexx do you use on desktop systems?

BTW, is the Regina mailing list active?



--
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 -- EXECIO intuitiveness

2024-04-21 Thread Paul Gilmartin
On Sun, 21 Apr 2024 14:54:33 -0400, Bob Bridges wrote:

>Wait, what?  Are you saying TSO-REXX has LINEIN, CHAROUT and so on?
>
Not exactly: 

>...Although I do think EXECIO is nicely flexible.  Still, I find myself 
>looking up the syntax occasionally when doing something unusual.
>
>---
>-Original Message-
>From: Seymour J Metz
>Sent: Sunday, April 21, 2024 10:40
>
>Given that REXX in an OMVS environment supports ANSI stream I/O, why use 
>EXECIO?

-- 
gil

--
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 -- EXECIO intuitiveness

2024-04-21 Thread Bob Bridges
Wait, what?  Are you saying TSO-REXX has LINEIN, CHAROUT and so on?

...Although I do think EXECIO is nicely flexible.  Still, I find myself looking 
up the syntax occasionally when doing something unusual.

---
Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313

/* [Hitler] has grasped the falsity of the hedonistic attitude to life. Nearly 
all western thought since the last war, certainly all ‘progressive’ thought, 
has assumed tacitly that human beings desire nothing beyond ease, security and 
avoidance of pain. In such a view of life there is no room, for instance, for 
patriotism and the military virtuesHitler, because in his own joyless mind 
he feels it with exceptional strength, knows that human beings ~don’t~ want 
only comfort, safety, short working-hours, hygiene, birth-control and, in 
general, common sense; they also, at least intermittently, want struggle and 
self-sacrifice, not to mention drums, flags and loyalty-parades. However they 
may be as economic theories, Fascism and Nazism are psychologically far sounder 
than any hedonistic conception of life.  -George Orwell, reviewing _Mein Kampf_ 
in 1940. */

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Seymour J Metz
Sent: Sunday, April 21, 2024 10:40

Given that REXX in an OMVS environment supports ANSI stream I/O, why use EXECIO?

--- On Sat, 20 Apr 2024 23:58:18 -0400, Steve Thompson wrote:
>I concur about REXX EXECIO I/O is not exactly intuitive.

--
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 -- EXECIO intuitiveness

2024-04-21 Thread Bob Bridges
Long before I started using ooRexx, before I even knew it existed in fact, I 
talked my boss at one company into letting me install a copy of Regina on my 
company workstation in order to save him some work.

It turned out to be an interesting project.  Apparently until then someone 
would occasionally grab a random meg or two of firewall logs and read them into 
Excel.  Then someone else would spend time sorting lines, deleting most of them 
but keeping all the ones that reported a rejected attempt at sending a packet.

The thing is, if a workstation sends ten thousand packets to a single IP 
address, or to several, it's probably legitimate work.  If many workstations 
send packets to one IP address, likewise work.  But if one IP address sends one 
packet to each of thousands of other addresses, it's very likely a virus 
looking for other machines to infect.  So someone would take all those firewall 
records, try to parse dates and IP addresses, and come up with suspicious 
behavior.

I heard my boss talking on the phone about this process - I think he said it 
normally took someone a couple hours - and after he hung up I approached him 
about a better way.  So I took a day or two writing a Regina program which 
could parse out all those records and produce a CSV of the suspicious actors in 
a few seconds.

After that I was the company virus hunter.  I maintained a database, which 
wasn't too bad, but I also had to run around to various locations to eliminate 
the problem malware, which was an unwelcome chore.  Still, I enjoyed the hunt.  
And Rexx is really, really good at that sort of text interpretation.

(Programming is so cool!)

---
Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313

/* Law #36 of combat operations:  Radar tends to fail at night and in bad 
weather, and especially during both. */

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Paul Gilmartin
Sent: Sunday, April 21, 2024 01:11

Which Rexx do you use on desktop systems?

BTW, is the Regina mailing list active?

--
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

2024-04-21 Thread Robin Vowels

On 2024-04-22 02:13, Paul Gilmartin wrote:

On Mon, 22 Apr 2024 01:52:14 +1000, Robin Vowels wrote:o

   ...
One would not use as variable such common keywords as mentioned above.

The real advantage is that one doesn't need to keep in mind
all those uncommonly-used words that might be used as variable names,


somewhat the opposite.  If the keywords are reserved, the processor 
will

inform the programmer of misuse.


Probably, but why waste time and effort changing the program
and re-compiling?

Another advantage of unreserved words is that the addition of a new 
keyword

into the language does not invalidate any existing program.


 A processor can have an "oracle" that
always correctly divines the programmer's intent, as PL/I does.  But
in a single Rexx program, the same symbol can be a variable in one
instruction but a keyword in the next, with no syntax error but
unexpected result.


Doesn't sound like sensible design.

--
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

2024-04-21 Thread Paul Gilmartin
On Mon, 22 Apr 2024 01:52:14 +1000, Robin Vowels wrote:o
>...
>One would not use as variable such common keywords as mentioned above.
>
>The real advantage is that one doesn't need to keep in mind
>all those uncommonly-used words that might be used as variable names,
> 
somewhat the opposite.  If the keywords are reserved, the processor will
inform the programmer of misuse.  A processor can have an "oracle" that
always correctly divines the programmer's intent, as PL/I does.  But
in a single Rexx program, the same symbol can be a variable in one
instruction but a keyword in the next, with no syntax error but
unexpected result.

-- 
gil

--
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

2024-04-21 Thread Robin Vowels

On 2024-04-22 00:05, Seymour J Metz wrote:
While PL/I has no reserved words, it is considered bad form to use a 
keyword as an entry or variable name. The same principle applies to 
Rexx; using, e.g., DO, ELSE, END, EXIT, IF, ITERATE, OTHERWISE, 
PROCEDURE, THEN, WHEN, as a variable name can make the code hard to 
read.


One would not use as variable such common keywords as mentioned above.

The real advantage is that one doesn't need to keep in mind
all those uncommonly-used words that might be used as variable names,

--
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-21 Thread Paul Gilmartin
On Sun, 21 Apr 2024 15:19:40 +, Seymour J Metz  wrote:

>A few comments.
>
> 1. It's best to avoid names that a,e, or are similar to, keywords.
>
Astonishment factor with such as "LEAVE = 'date'; LEAVE".  No
Rexx syntax error, but unexpected result.

> 2. There is a decades-long argument about NOVALUE. I am in the camp that
>believes the default behavior to be too useful to give up; others believe
>that it is dangerous.
> 
I'm inconsistent.  I routinely use SIGNAL ON NOVALUE.  It reports most of
my typos.  I very rarely use "set -o no''unset".  The difference may be due
sh marking variables with '$'.

> 3. T e default environment for statements that are expressions is often an
>application rater than the operating system, e.g., ISPEXEC, IISREDIT, 
> XEDIT.
>That behavior is incredibly useful.
>
Water is wet.  I once found CMS ISPF to reauire "address isredit 'isredit 
'".
Otherwise the command went to ISPEXEC.

-- 
gil

--
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-21 Thread Seymour J Metz
A few comments.

 1. It's best to avoid names that are, or are similar to, keywords.

 2. There is a decades-long argument about NOVALUE. I am in the camp that
believes the default behavior to be too useful to give up; others believe
that it is dangerous.

 3. The default environment for statements that are expressions is often an
application rater than the operating system, e.g., ISPEXEC, IISREDIT, XEDIT.
That behavior is incredibly useful.

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


From: IBM Mainframe Discussion List  on behalf of 
Rony G. Flatscher 
Sent: Saturday, April 20, 2024 1:50 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX vs other languages WAS: Rexx numeric digits and scientific 
notation question

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 p

Re: REXX vs other languages -- EXECIO intuitiveness

2024-04-21 Thread Paul Gilmartin
On Sun, 21 Apr 2024 14:40:26 +, Seymour J Metz wrote:

>Given that REXX in an OMVS environment supports ANSI stream I/O, why use 
>EXECIO?
>
OMVS stream I/O doesn't support CKD /PO/PS data sets.

What about DSFS?

Does the DSFS User's Guide mention any restrictions with Rexx stream I/O?

-- 
gil

--
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 -- EXECIO intuitiveness

2024-04-21 Thread Seymour J Metz
Many platforms support ooRexx and Regina, whiinclude ANSI stream I/O. EXECIO is 
nice when portability is an issue, but otherwise I use stream.

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


From: IBM Mainframe Discussion List  on behalf of 
Steve Thompson 
Sent: Saturday, April 20, 2024 11:58 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX vs other languages -- EXECIO intuitiveness

I concur about REXX EXECIO I/O is not exactly intuitive.

REXX, first implemented in CMS used the CMS I/O utilities
Over in TSO they created EXECIO which does not operate in the
same way as does the CMS EXECIO. And it causes me headaches when
I work on CMS for a year or two and then come back to TSO to have
it NOT be have as it did in CMS. Especially the STEM variable and
trying to write a record.

And so after working in TSO for a year or so to go back to CMS --
I need to learn and make use of PIPEs which is not supported over
on TSO Most shops do not see the need to pay for TSO Pipes.
Sigh.

And so, with Windows I/O is different (still talking REXX), same
problem with Linux. I/O is not handled the same for simple reads
and writes from my perspective.

Never-the-Less, I really appreciate REXX over EXEC, EXEC2 and CLIST.

Steve Thompson


On 4/19/2024 9:28 PM, Andrew Rowley wrote:
> On 20/04/2024 1:42 am, Jay Maynard wrote:
>> Agreed Java is simply far too complex a language and ecosystem
>> to hold in
>> the mind. Python is as ubiquitous and much easier to deal with.
>
> Really? What do you NEED to learn for Java that you don't need
> to learn for other languages? public static void main(String[]
> args)?
>
> Loops, if statements, data types, string processing are things
> you need to learn for all languages. I/O is useful (Rexx EXECIO
> isn't exactly intuitive).
>
>


--
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


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

2024-04-21 Thread Seymour J Metz
I frequently use single letter control variables in short DO loops. But my 
primary criterion is legibility.

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


From: IBM Mainframe Discussion List  on behalf of 
Bruce Hewson <0499d3d5e892-dmarc-requ...@listserv.ua.edu>
Sent: Sunday, April 21, 2024 12:58 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX vs other languages WAS: Rexx numeric digits and scientific 
notation question

Hello Bob,

I use "cnt" for my loop counters. I stopped using FORTRAN style single 
character variable names when I started coding in REXX.

Except I do use them on occasion for building large stem variable lists.

example:-

i=i+1;jcl.i="//BRUCESMP JOB (1234546),'Bruce SMP jobn',"
i=i+1;jcl.i="// CLASS=A,   "
i=i+1;jcl.i="// MSGCLASS=X,"
i=i+1;jcl.i="// MSGLEVEL=(1,1),"
i=i+1;jcl.i="// NOTIFY= "
i=i+1;jcl.i="//*   "

So many ways to use REXX.

Regards
Bruce


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'.)
>
>---
>Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313
>

--
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


Re: REXX vs other languages -- EXECIO intuitiveness

2024-04-21 Thread Seymour J Metz
Given that REXX in an OMVS environment supports ANSI stream I/O, why use EXECIO?

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


From: IBM Mainframe Discussion List  on behalf of 
Paul Gilmartin <042bfe9c879d-dmarc-requ...@listserv.ua.edu>
Sent: Sunday, April 21, 2024 1:11 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX vs other languages -- EXECIO intuitiveness

On Sat, 20 Apr 2024 23:58:18 -0400, Steve Thompson wrote:

>I concur about REXX EXECIO I/O is not exactly intuitive.
>
>REXX, first implemented in CMS used the CMS I/O utilities
>Over in TSO they created EXECIO which does not operate in the
>same way as does the CMS EXECIO. And it causes me headaches when
>I work on CMS for a year or two and then come back to TSO to have
>it NOT be have as it did in CMS. Especially the STEM variable and
>trying to write a record.
>
Note the fundamental difference in file specs:
CMS:  FN FT FM
Z/OS: DDNAME
... but I have written portable EXECs -- on z/OS
my  FileSpec variable is one word; on CMS three.

And, irritatingly, the syntax of ADDRESS MVS EXECIO
differs depending on whether the EXEC is started from
a UNIX or non-UNIX address space.

The lack of (VAR string is probably impelled by TSO
RECFM=F, which would have a trailing blank entanglement.

>And so after working in TSO for a year or so to go back to CMS --
>I need to learn and make use of PIPEs which is not supported over
>on TSO Most shops do not see the need to pay for TSO Pipes.
>Sigh.
>
Is TSO Pipes even marketed except, an obsolete version
bundled with BatchPipes?

>And so, with Windows I/O is different (still talking REXX), same
>problem with Linux. I/O is not handled the same for simple reads
>and writes from my perspective.
>
Files on desktop systems are largely character streams; on
mainframes, record oriented.  Beyond that, standard Rexx
stream I/O came late to CMS because developers economized
by using the available EXECIO.

>Never-the-Less, I really appreciate REXX over EXEC, EXEC2 and CLIST.
>
Which Rexx do you use on desktop systems?

BTW, is the Regina mailing list active?

--
gil

--
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


Re: REXX vs other languages

2024-04-21 Thread Seymour J Metz
While PL/I has no reserved words, it is considered bad form to use a keyword as 
an entry or variable name. The same principle applies to Rexx; using, e.g., DO, 
ELSE, END, EXIT, IF, ITERATE, OTHERWISE, PROCEDURE, THEN, WHEN, as a variable 
name can make the code hard to read.

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


From: IBM Mainframe Discussion List  on behalf of 
Robin Vowels <054c2a8bb600-dmarc-requ...@listserv.ua.edu>
Sent: Sunday, April 21, 2024 5:08 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX vs other languages

On 2024-04-21 04:22, Paul Gilmartin wrote:
> On Sat, 20 Apr 2024 19:50:56 +0200, Rony G. Flatscher wrote:
>>...
>> 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
>>
> I disagree.  Although it's context-sensitive.  But ITERATE and LEAVE
> are
> keywords within DO loops,

Are you confusing reserved words and keywords?
Keywords can be reserved words that cannot be used for other purposes,
as in COBOL.

In some languages, such as PL/I, keywords still have a meaning in the
language, but can be used for other purposes such as identifiers.
Such words are not reserved words.

> which may not be intuitively obvious.  Otherwise
> they would be commands.  RETURN is generally a keyword.  And THEN
> is a keyword in an IF.
>
>> they would not break existing Rexx programs that happen to use them
>> already,
> unlike other programming languages.)
>>
> Not true.  When I first learned Rexx, A='XYZ'B was legal.  Later, it
> became
> a syntax error.

--
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


Re: REXX vs other languages

2024-04-21 Thread Robin Vowels

On 2024-04-21 04:22, Paul Gilmartin wrote:

On Sat, 20 Apr 2024 19:50:56 +0200, Rony G. Flatscher wrote:

   ...
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


I disagree.  Although it's context-sensitive.  But ITERATE and LEAVE 
are

keywords within DO loops,


Are you confusing reserved words and keywords?
Keywords can be reserved words that cannot be used for other purposes,
as in COBOL.

In some languages, such as PL/I, keywords still have a meaning in the
language, but can be used for other purposes such as identifiers.
Such words are not reserved words.


which may not be intuitively obvious.  Otherwise
they would be commands.  RETURN is generally a keyword.  And THEN
is a keyword in an IF.

they would not break existing Rexx programs that happen to use them 
already,

unlike other programming languages.)


Not true.  When I first learned Rexx, A='XYZ'B was legal.  Later, it 
became

a syntax error.


--
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-21 Thread Robin Vowels

On 2024-04-21 15:38, Paul Gilmartin wrote:

On Sat, 20 Apr 2024 23:58:18 -0500, Bruce Hewson wrote:


I use "cnt" for my loop counters. I stopped using FORTRAN style single 
character variable names when I started coding in REXX.



I thought FORTRAN allowed six.


It did.  Now it allows many more.

--
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 Paul Gilmartin
On Sat, 20 Apr 2024 23:58:18 -0500, Bruce Hewson wrote:
>
>I use "cnt" for my loop counters. I stopped using FORTRAN style single 
>character variable names when I started coding in REXX. 
>
I thought FORTRAN allowed six.

(Be careful how you pronounce that!)

-- 
gil

--
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 -- EXECIO intuitiveness

2024-04-20 Thread Paul Gilmartin
On Sat, 20 Apr 2024 23:58:18 -0400, Steve Thompson wrote:

>I concur about REXX EXECIO I/O is not exactly intuitive.
>
>REXX, first implemented in CMS used the CMS I/O utilities
>Over in TSO they created EXECIO which does not operate in the
>same way as does the CMS EXECIO. And it causes me headaches when
>I work on CMS for a year or two and then come back to TSO to have
>it NOT be have as it did in CMS. Especially the STEM variable and
>trying to write a record.
>
Note the fundamental difference in file specs:
CMS:  FN FT FM
Z/OS: DDNAME
... but I have written portable EXECs -- on z/OS
my  FileSpec variable is one word; on CMS three.

And, irritatingly, the syntax of ADDRESS MVS EXECIO
differs depending on whether the EXEC is started from
a UNIX or non-UNIX address space.

The lack of (VAR string is probably impelled by TSO
RECFM=F, which would have a trailing blank entanglement.

>And so after working in TSO for a year or so to go back to CMS --
>I need to learn and make use of PIPEs which is not supported over
>on TSO Most shops do not see the need to pay for TSO Pipes.
>Sigh.
>
Is TSO Pipes even marketed except, an obsolete version
bundled with BatchPipes?

>And so, with Windows I/O is different (still talking REXX), same
>problem with Linux. I/O is not handled the same for simple reads
>and writes from my perspective.
>
Files on desktop systems are largely character streams; on
mainframes, record oriented.  Beyond that, standard Rexx
stream I/O came late to CMS because developers economized
by using the available EXECIO.

>Never-the-Less, I really appreciate REXX over EXEC, EXEC2 and CLIST.
>
Which Rexx do you use on desktop systems?

BTW, is the Regina mailing list active?

-- 
gil

--
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 Bruce Hewson
Hello Bob,

I use "cnt" for my loop counters. I stopped using FORTRAN style single 
character variable names when I started coding in REXX. 

Except I do use them on occasion for building large stem variable lists.

example:-

i=i+1;jcl.i="//BRUCESMP JOB (1234546),'Bruce SMP jobn',"
i=i+1;jcl.i="// CLASS=A,   "
i=i+1;jcl.i="// MSGCLASS=X,"
i=i+1;jcl.i="// MSGLEVEL=(1,1),"
i=i+1;jcl.i="// NOTIFY= "
i=i+1;jcl.i="//*   "

So many ways to use REXX.   

Regards
Bruce


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'.)
>
>---
>Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313
>

--
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 -- EXECIO intuitiveness

2024-04-20 Thread Steve Thompson

I concur about REXX EXECIO I/O is not exactly intuitive.

REXX, first implemented in CMS used the CMS I/O utilities 
Over in TSO they created EXECIO which does not operate in the 
same way as does the CMS EXECIO. And it causes me headaches when 
I work on CMS for a year or two and then come back to TSO to have 
it NOT be have as it did in CMS. Especially the STEM variable and 
trying to write a record.


And so after working in TSO for a year or so to go back to CMS -- 
I need to learn and make use of PIPEs which is not supported over 
on TSO Most shops do not see the need to pay for TSO Pipes. 
Sigh.


And so, with Windows I/O is different (still talking REXX), same 
problem with Linux. I/O is not handled the same for simple reads 
and writes from my perspective.


Never-the-Less, I really appreciate REXX over EXEC, EXEC2 and CLIST.

Steve Thompson


On 4/19/2024 9:28 PM, Andrew Rowley wrote:

On 20/04/2024 1:42 am, Jay Maynard wrote:
Agreed Java is simply far too complex a language and ecosystem 
to hold in

the mind. Python is as ubiquitous and much easier to deal with.


Really? What do you NEED to learn for Java that you don't need 
to learn for other languages? public static void main(String[] 
args)?


Loops, if statements, data types, string processing are things 
you need to learn for all languages. I/O is useful (Rexx EXECIO 
isn't exactly intuitive).






--
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 Bob Bridges
Well, they may not be reserved, if you say so.  But I think I'd be a fool to 
try using "is", "if" or "in" as a loop counter, certainly for the sake of the 
programmer who inherits my work but I'm sure it would confuse me too.

---
Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313

/* 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 
Rony G. Flatscher
Sent: Saturday, April 20, 2024 13:51

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.)

> --- 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'.)
> 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.

--
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 Bob Bridges
I've inherited a REXX app from a departed coworker who uses (for example) 
'complete?' as a Boolean variable name, where in REXX I would use 'fcomplete' 
for the same purpose ('f' for "flag").  I see the sense of the question mark, 
but I've been coding too many decades; I can't FEEL it.  I probably won't adopt 
it.

---
Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313

/* Crossbows don't kill people; quarrels do.  -from a conversation at a 
Patrick-O'Brian listserv */

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Robert Prins
Sent: Saturday, April 20, 2024 16:18

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

--
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 Bob Bridges
Ooh, I'm sure I've read that I can do that but I forgot.  I like that - think 
I'll start doing it myself.  Normally I'm rabid about indentation, but 
occasionally in a longer program I lose track of something and have to spend a 
of time searching for where I left out an End.

---
Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313

/* Do you know what constitutes a "hate crime"?  Put your thinking caps on.  
What tools do we need to determine whether a crime was motivated by hate or 
prejudice?  Answer: We need thought police.  -from "See, I Told You So" by Rush 
Limbaugh */

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Paul Gilmartin
Sent: Saturday, April 20, 2024 11:41
>
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.

--
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 Paul Gilmartin
On Sat, 20 Apr 2024 19:50:56 +0200, Rony G. Flatscher wrote:
>...
>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 
>
I disagree.  Although it's context-sensitive.  But ITERATE and LEAVE are
keywords within DO loops, which may not be intuitively obvious.  Otherwise
they would be commands.  RETURN is generally a keyword.  And THEN
is a keyword in an IF.

>they would not break existing Rexx programs that happen to use them already, 
>unlike other 
>programming languages.)
>
Not true.  When I first learned Rexx, A='XYZ'B was legal.  Later, it became
a syntax error.

-- 
gil

--
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 Paul Gilmartin
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.

-- 
gil

--
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-20 Thread Robert Prins
Try the two characters that are pretty much unique to REXX, "!" and "?"
especially for small local loops.

Robert
-- 
Robert AH Prins
robert(a)prino(d)org
The hitchhiking grandfather 
Some REXX code for use on z/OS


On Sat, 20 Apr 2024 at 15:08, Bob Bridges <
0587168ababf-dmarc-requ...@listserv.ua.edu> 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'.)
>
> -Original Message-
> From: IBM Mainframe Discussion List  On Behalf
> Of Andrew Rowley
> Sent: Friday, April 19, 2024 22:41
>
> It doesn't cause a problem except when it does. One danger is a typo in
> a variable name. When I wrote some complex Rexx I did use SIGNAL ON
> NOVALUE, but I wasn't totally appeased!
>
> --- On 20/04/2024 12:41 am, Rony G. Flatscher wrote:
> > 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 it or feel that it should not be allowed. ;) )
>

--
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 Paul Gilmartin
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'.)
>
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.

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.

-- 
gil

--
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 Bob Bridges
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'.)

---
Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313

/* When I was ten, I read fairy tales in secret and would have been ashamed if 
I had been found doing so. Now that I am fifty I read them openly. When I 
became a man I put away childish things, including the fear of childishness and 
the desire to be very grown up.  -C.S. Lewis */

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Andrew Rowley
Sent: Friday, April 19, 2024 22:41

It doesn't cause a problem except when it does. One danger is a typo in 
a variable name. When I wrote some complex Rexx I did use SIGNAL ON 
NOVALUE, but I wasn't totally appeased!

--- On 20/04/2024 12:41 am, Rony G. Flatscher wrote:
> 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 it or feel that it should not be allowed. ;) ) 

--
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-19 Thread Andrew Rowley

On 20/04/2024 12:41 am, Rony G. Flatscher wrote:

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.


It's very specifically not an attempt to apply dynamic typing. It's type 
inference, and can only be used when the compiler can determine the 
type. The resulting type is still static. There's no practical 
difference between


var start = ZonedDateTime.now();

and

ZonedDateTime start = ZonedDateTime.now();

except for the amount of code that needs to be written.


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


This is one of the reasons I prefer static languages. Run time errors 
can go unnoticed until they are discovered on a customer system. Compile 
time errors are almost certain to be discovered in the development 
environment. (Or for in-house programming, compile time errors are 
discovered in development during business hours, runtime errors might be 
discovered in production at 3am...)


Any error that can be found at compile time instead of runtime is a win.


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).


There might be a distinction between the difficulty of writing a program 
that runs, and writing a program that is correct.



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!


I had no problem back in the day when I first learnt it, but having 
learnt other languages since I don't think this is intuitive. 
Particularly the added blank between strings (I agree it is surprising). 
There are other variations here, e.g. I'm not sure how abuttal works 
with 2 variables rather than a variable and a literal.



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 it or feel that it should not be allowed. ;) ) 


It doesn't cause a problem except when it does. One danger is a typo in 
a variable name. When I wrote some complex Rexx I did use SIGNAL ON 
NOVALUE, but I wasn't totally appeased!


I'm not trying to be negative about Rexx. I still use it when 
appropriate. But I think z/OS people make a mistake ignoring Java. It's 
fast (e.g. 1GB/s for my CICS SMF processing), makes powerful features 
available (e.g. the Twilio example to send SMS messages from z/OS) and 
it's available on pretty much every z/OS system now.



--
Andrew Rowley
Black Hill Software

--
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-19 Thread Andrew Rowley

On 20/04/2024 1:42 am, Jay Maynard wrote:

Agreed Java is simply far too complex a language and ecosystem to hold in
the mind. Python is as ubiquitous and much easier to deal with.


Really? What do you NEED to learn for Java that you don't need to learn 
for other languages? public static void main(String[] args)?


Loops, if statements, data types, string processing are things you need 
to learn for all languages. I/O is useful (Rexx EXECIO isn't exactly 
intuitive).


There are lots of add-ons, but you learn them (or just reference the 
details) if you need them. You still need to install add-ons and learn 
extra functionality for Python. Packages providing additional 
functionality are a good thing generally.


The Twilio Python sample looks very similar to the Java version:

https://www.twilio.com/docs/messaging/quickstart/python#send-an-sms-using-twilio

I ran the Java version on z/OS by uploading the Twilio 
jar-with-dependencies and running the sample under BPXBATCH. Is Python 
easier???


//BPXBATCH EXEC PGM=BPXBATCH,REGION=512M
//STDPARM  DD *
sh /usr/lpp/java/J11.0_64/bin/java
 /home/andrewr/java/src/TwilioTest.java
 "Hello from z/OS"
//STDENV   DD *
CLASSPATH=/home/andrewr/java/lib/twilio-10.1.3-jar-with-dependencies.jar
TWILIO_ACCOUNT_SID=xx
TWILIO_AUTH_TOKEN=
//SYSOUT   DD SYSOUT=*
//STDOUT   DD SYSOUT=*
//STDERR   DD SYSOUT=*


--
Andrew Rowley
Black Hill Software

--
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-19 Thread Bob Bridges
Oh, I dunno.  Generalizations aren't invalid as long as you don't mistake them 
for blanket stereotypes, and generalizations are the only possible way to 
describe general groups.  I see no cause for offense here.

---
Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313

/* Be kind whenever possible.  It is always possible.  -Dalai Lama */

(I swear this was just the next tagline in the queue; I didn't pick it out for 
this occasion.  Really, I promise.)

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Seymour J Metz
Sent: Friday, April 19, 2024 12:54

Why don't you speak for yourself instead of inventing urban legends?

Both old timers and youngsters are individuals, with vast panoplies of 
different attitudes and opinions. It is presumptuous and rude to make such 
arrogant blanket characterizations.

There are plenty of old timers who like the bleeding edge, and plenty of 
youngsters("young fogies") who are resistant to change.


From: IBM Mainframe Discussion List  on behalf of 
David Crayford <0595a051454b-dmarc-requ...@listserv.ua.edu>
Sent: Friday, April 19, 2024 11:25 AM

I’m not sure I would use Java as a REXX alternative now we have Python. REXX is 
very much legacy now. The old timers love it because it’s all they know but 
push come to shove Python is much easier to learn then Java with all the OO 
cruft.

--
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-19 Thread Seymour J Metz
Why don't you speak for yourself instead of inventing urban legends?

Both old timers and youngsters are individuals, with vast panoplies of 
different attitudes and opinions. It is presumptuous and rude to make such 
arrogant blanket characterizations.

There are plenty of old timers who like the bleeding edge, and plenty of 
youngsters("young fogies") who are resistant to change.

--
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, April 19, 2024 11:25 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX vs other languages WAS: Rexx numeric digits and scientific 
notation question

I’m not sure I would use Java as a REXX alternative now we have Python. REXX is 
very much legacy now. The old timers love it because it’s all they know but 
push come to shove Python is much easier to learn then Java with all the OO 
cruft.

> On 19 Apr 2024, at 7:50 AM, 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.
>
>
>> 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. 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. If you're used to the language you 
> write it without thinking and avoid the traps, but the rules are there 
> nonetheless.
>
> Java is relatively straightforward, and shares many rules with other 
> languages - C++, C# etc. I'm not saying Java is perfect - it has its own 
> traps (int vs Integer etc) but I find it a much easier language to work with.
>
> --
> Andrew Rowley
> Black Hill Software
>
> --
> 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


--
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-19 Thread Jay Maynard
Agreed Java is simply far too complex a language and ecosystem to hold in
the mind. Python is as ubiquitous and much easier to deal with.

On Fri, Apr 19, 2024 at 10:25 AM David Crayford <
0595a051454b-dmarc-requ...@listserv.ua.edu> wrote:

> I’m not sure I would use Java as a REXX alternative now we have Python.
> REXX is very much legacy now. The old timers love it because it’s all they
> know but push come to shove Python is much easier to learn then Java with
> all the OO cruft.
>
> > On 19 Apr 2024, at 7:50 AM, 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.
> >
> >
> >> 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. 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. If you're used to the language
> you write it without thinking and avoid the traps, but the rules are there
> nonetheless.
> >
> > Java is relatively straightforward, and shares many rules with other
> languages - C++, C# etc. I'm not saying Java is perfect - it has its own
> traps (int vs Integer etc) but I find it a much easier language to work
> with.
> >
> > --
> > Andrew Rowley
> > Black Hill Software
> >
> > --
> > 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
>


-- 
Jay Maynard

--
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-19 Thread David Crayford
I’m not sure I would use Java as a REXX alternative now we have Python. REXX is 
very much legacy now. The old timers love it because it’s all they know but 
push come to shove Python is much easier to learn then Java with all the OO 
cruft. 

> On 19 Apr 2024, at 7:50 AM, 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.
> 
> 
>> 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. 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. If you're used to the language you 
> write it without thinking and avoid the traps, but the rules are there 
> nonetheless.
> 
> Java is relatively straightforward, and shares many rules with other 
> languages - C++, C# etc. I'm not saying Java is perfect - it has its own 
> traps (int vs Integer etc) but I find it a much easier language to work with.
> 
> -- 
> Andrew Rowley
> Black Hill Software
> 
> --
> 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


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

2024-04-19 Thread Farley, Peter
+1 for the oleinfo utilities Rony points to here.  They were a great help to me 
in crafting and debugging a VBS script I was writing to help automate creation 
of an Excel report spreadsheet.

From: IBM Mainframe Discussion List  On Behalf Of 
Rony G. Flatscher
Sent: Friday, April 19, 2024 9:45 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX vs other languages WAS: Rexx numeric digits and scientific 
notation question


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://urldefense.com/v3/__https://sourceforge.net/projects/oorexx/files/oorexx/5.1.0beta/__;!!Ebr-cpPeAnfNniQ8HSAI-g_K5b7VKg!PKDIGv21yG1HutL5OYw-GXz7XNI2i-z5hDkCqU1pXXZkBvLUD1Y4DHC_4gno0d5HunpmDb9SpOqWmDOTlSK6KNPxocSUcYbc$<https://urldefense.com/v3/__https:/sourceforge.net/projects/oorexx/files/oorexx/5.1.0beta/__;!!Ebr-cpPeAnfNniQ8HSAI-g_K5b7VKg!PKDIGv21yG1HutL5OYw-GXz7XNI2i-z5hDkCqU1pXXZkBvLUD1Y4DHC_4gno0d5HunpmDb9SpOqWmDOTlSK6KNPxocSUcYbc$>>.



[2]: OLEInfo Utility:

<https://urldefense.com/v3/__https://wi.wu.ac.at/rgf/wu/lehre/autowin/material/foils/130_AutoWin_oleinfo_V04.pdf__;!!Ebr-cpPeAnfNniQ8HSAI-g_K5b7VKg!PKDIGv21yG1HutL5OYw-GXz7XNI2i-z5hDkCqU1pXXZkBvLUD1Y4DHC_4gno0d5HunpmDb9SpOqWmDOTlSK6KNPxoc1JRMod$<https://urldefense.com/v3/__https:/wi.wu.ac.at/rgf/wu/lehre/autowin/material/foils/130_AutoWin_oleinfo_V04.pdf__;!!Ebr-cpPeAnfNniQ8HSAI-g_K5b7VKg!PKDIGv21yG1HutL5OYw-GXz7XNI2i-z5hDkCqU1pXXZkBvLUD1Y4DHC_4gno0d5HunpmDb9SpOqWmDOTlSK6KNPxoc1JRMod$>>



[3]: OLE and Nutshell Examples:

<https://urldefense.com/v3/__https://wi.wu.ac.at/rgf/wu/lehre/autowin/material/foils/110_AutoWin_V18.pdf__;!!Ebr-cpPeAnfNniQ8HSAI-g_K5b7VKg!PKDIGv21yG1HutL5OYw-GXz7XNI2i-z5hDkCqU1pXXZkBvLUD1Y4DHC_4gno0d5HunpmDb9SpOqWmDOTlSK6KNPxoRAs1_Tx$<https://urldefense.com/v3/__https:/wi.wu.ac.at/rgf/wu/lehre/autowin/material/foils/110_AutoWin_V18.pdf__;!!Ebr-cpPeAnfNniQ8HSAI-g_K5b7VKg!PKDIGv21yG1HutL5OYw-GXz7XNI2i-z5hDkCqU1pXXZkBvLUD1Y4DHC_4gno0d5HunpmDb9SpOqWmDOTlSK6KNPxoRAs1_Tx$>>



> -Original Message-

> From: IBM Mainframe Discussion List 
> mailto:IBM-MAIN@LISTSERV.UA.EDU>> 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.

--

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.


--
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-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 it or feel that it should not be allowed. ;) )


If you're used to the language you write it without thinking 

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: 
.


[2]: OLEInfo Utility: 



[3]: OLE and Nutshell Examples: 




-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 Andrew Rowley

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.



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. 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. If you're used to 
the language you write it without thinking and avoid the traps, but the 
rules are there nonetheless.


Java is relatively straightforward, and shares many rules with other 
languages - C++, C# etc. I'm not saying Java is perfect - it has its own 
traps (int vs Integer etc) but I find it a much easier language to work 
with.


--
Andrew Rowley
Black Hill Software

--
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 Bob Bridges
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 .

---
Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313

/* This universe is full of magical things patiently waiting for our wits to 
grow sharper. */


-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 
. 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 Andrew Rowley

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. They show up bugs in the code and make it easier to write 
correct programs. The IDE is also an important factor.


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


--
Andrew Rowley
Black Hill Software

--
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 Bob Bridges
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.

---
Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313

/* Taxation ~with~ representation isn't all that great, either. */


-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Rony G. Flatscher
Sent: Wednesday, April 17, 2024 14:24

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.

You may want to take a look at  the article 

 which introduces Rexx and ooRexx to engineering educators. Reading that 
article, any interested REXX programmer from this mailing list should be able 
to learn ooRexx in about half an hour!

--
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 

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

2024-04-16 Thread Andrew Rowley

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.


--
Andrew Rowley
Black Hill Software

--
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-15 Thread Seymour J Metz
There is no automatic environment integration. There is an API that makes it 
easy for the developer of an application to support Rexx scripts and there are 
environments whose developers have exploited that API. ooRexx is not inferior 
in that regard.

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


From: IBM Mainframe Discussion List  on behalf of Jon 
Perryman 
Sent: Monday, April 15, 2024 1:08 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: REXX vs other languages WAS: Rexx numeric digits and scientific 
notation question

>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.

--
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