Re: Java (Re: Some questions on SYSCALL

2022-07-14 Thread Rony G. Flatscher

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

On 11.07.2022 10:42, David Crayford wrote:

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

  Am 09.07.2022 um 03:15 schrieb David Crayford :

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

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

On 06.07.2022 11:03, Seymour J Metz wrote:

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

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




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

Beauty lies in the eyes of the beholder ...

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




Gradle doesn't work very well on some systems.

What does not work for you?

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




C# is a far better language then Java.

Excuse me? 

Off the top of my header.

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



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


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


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







3. Unsigned integer types

Not really a problem.


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


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


The license is GPL 2 with the classpath exception , also 
seeing from time to time IBM 

Re: Java (Re: Some questions on SYSCALL

2022-07-11 Thread David Crayford

On 10/07/2022 6:49 pm, Rony wrote:
  
Am 09.07.2022 um 03:15 schrieb David Crayford :

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

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

On 06.07.2022 11:03, Seymour J Metz wrote:

... cut ...

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

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

Eclipse, NetBeans, IntelliJ, ...

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



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

Beauty lies in the eyes of the beholder ...

Maven is not Java and still an incredible boon!

I agree. I just don't like XML. I would rather use Gradle with it's nice Groovy 
DSL where I can drop down and write code for tricky configurations.



Gradle doesn't work very well on some systems.

What does not work for you?

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

Gradle doesn't work properly on z/OS. First thing I tried was to nobble 
spawning the daemon. I used AOT -Xshareclasses so start up times were not a 
problem. However, Gradle was downloading lots of unwanted dependencies and 
filled up the file system cache. I abandoned it and stuck to Maven.



C# is a far better language then Java.

Excuse me? 

Off the top of my header.

1. Generics done properly with reflection support, not puny type erasure.

Java retains generics information in byte code (for the compiler) after type 
erasure (such that the runtime does not have to recheck after compilation, 
after all the compiler checked already).


2. No checked exceptions

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


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






3. Unsigned integer types

Not really a problem.


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


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




4. Value types

Not really a problem.


Maybe not for you. It's my understanding that you're an educator that 
teaches stuff like OLE and Windows GUI programming using JavaFX. The 
products I work on are back-end systems that process missions of records 
that originate from z/OS data sources. We need to serialize those binary 
records to other formats such as JSON as efficiently as possible. C# has 
struct value types and pointers (unsafe blocks) which would be brilliant 
for this kind of work. IBM realizes this and have implemented 
PackedObjects in their JDK which use intrinsics. Very similar to structs 
and value types in C#. Shame it's not portable!


https://www.ibm.com/docs/en/sdk-java-technology/7.1?topic=poet-packed-objects-2





5. Better support for functional program, LINQ

How so, which bytecodes do you think of?


I'm talking about FP and LINQ which is C# DSL for functional programming 
which looks a bit like SQL.



Re: Java (Re: Some questions on SYSCALL

2022-07-10 Thread Rony
> 
> Am 09.07.2022 um 06:31 schrieb David Crayford :
> 
> On 8/07/2022 7:43 pm, Rony G. Flatscher wrote:
>>> On 08.07.2022 03:38, David Crayford wrote:
>>> On 7/07/2022 7:53 pm, Rony G. Flatscher wrote:
> When I select a language for a job, one of the things that I look at is 
> the ecosystem. I prefer ooRexx to Perl, but I find myself using
> Perl for some tasks because CPAN is an awesome resource. Python may not 
> be the best language for the task at hand, but it pays to check what 
> packages are available.
 
 Indeed Perl and Python have a great wealth of libraries available to them.
 
 There is one ecosystem that beats Perl, Python and practically any others: 
 Java
>>> 
>>> According to http://www.modulecounts.com/ which shows the number of unique 
>>> packages
>> 
>> Methodology: "... Data is collected /by scraping the relevant websites /once 
>> a day via a cron job and then stored in a Postgresql database for later 
>> retrieval. Growth rates are calculated by averaging data over the last week. 
>> I'm gathering counts of separate modules, so multiple versions of the same 
>> module/package/gem only count once (foo-1.2, foo-1.3 and bar-1.0 would count 
>> as 2 total).  ..."
>> 
>> Questioning the methodology, completeness, correctness and as a result the 
>> relevance. Did not find any checkbox for Java there hence wondering where 
>> your Java figures come from.
> 
> It gets the Java figures from Maven Central https://search.maven.org/stats. 
> There is no denying that Java has an gigantic eco-system. And a hell of a lot 
> of it is top notch. The product I'm currently working on wouldn't exist 
> without Java open source.
> 
> 
>> 
>>> Node.js   2019534
>>> Java   483102
>>> Python  386118
>>> Perl  18354
>>> 
>>> So the undisputed winner as far as ecosystem is JavaScript. 
>> 
>> This may be more an indication that there are many shortcomings and many 
>> packages by different authors that try to make the same needed 
>> functionalities available.
>> 
>> ... cut ...
>> 
>> Ad Java: JRE comes already with a wealth of packages on board that are 
>> add-ons in other languages.
> 
> The gripe I have is that what comes with the JRE is typically not as good as 
> open source. For example, JDK 11 finally included a half decent HttpClient 
> but it doesn't support anyway near the feature set of open source clients 
> such as OkHttp or Jetty 
> https://www.mocklab.io/blog/which-java-http-client-should-i-use-in-2020/. To 
> my knowledge there is still no support for JSON or Yaml even in JDK 18.
There are Java libraries for it.

Ad Java evolution, maintenance, here a nice overview:  
https://en.wikipedia.org/wiki/Java_version_history, covering Java 1 through 19 
and giving a brief outlook (there would be more on the openjdk.org homepage, 
look for the JEP - Java enhancement proposals - projects for Java).


>> 
>> In addition, almost all important business applications have Java APIs such 
>> that one can regard such applications as additional Java packages (e.g. 
>> OpenOffice/LibreOffice mainly implemented in C++ gained Java APIs and the 
>> ability to implement modules in Java; one result is the creation of a Java 
>> scripting framework for OpenOffice/LibreOffice which allows any language for 
>> which a javax.script implementation exists to be used as a scripting and 
>> macro language; one example for this comes with BSF4ooRexx).
>> 
>> Or think of the JDBC packages of the different database vendors, or ...
>> 
>>> I just downloaded vsam.js to process a VSAM data set in Node on z/OS and it 
>>> works well. IBM are certainly giving
>>> Node more love then REXX which will never officially support VSAM.
>> 
>> Indeed this is strange that IBM does not support REXX the same as other 
>> technologies.
> 
> IBM also provide a VSAM I/O module for Go 
> https://github.com/ibmruntimes/go-recordio.
> 
> 
>> 
>> Has that possibly to do (wild guess) that the developers do not know how to 
>> create REXX APIs on the mainframe? As probably C++ has a role here, then 
>> probably CMake based ooRexx 5 with its C++ APIs would make the creation of 
>> external ooRexx function libraries quite simple on the mainframe as well 
>> (judging from the existence of "z/OS XL C/C++ Library Reference SA22-7821" 
>> and "z/OS XL C/C++ Programming Guide SC09-4765").
> 
> The REXX programming services on z/OS are built for assembler. Bridging to 
> C/C++ can be done. I have code to do that but it's tricky. Porting ooRexx to 
> z/OS is very difficult. I actually managed to build it around 2008. If you 
> look in the oorexx-devel archives you will se conversations between myself 
> and Rick McGuire. There is a lot of weird pthread stuff intertwined with 
> message passing that made it unsuitable for running in an ISPF environment. I 
> put it in the too-hard basket and a a couple of years later discovered Lua 
> which was simple to port and unbelievably effecient. 

Re: Java (Re: Some questions on SYSCALL

2022-07-10 Thread Rony
 
Am 09.07.2022 um 03:15 schrieb David Crayford :
> 
> On 8/07/2022 7:17 pm, Rony G. Flatscher wrote:
>>> On 07.07.2022 17:45, David Crayford wrote:
>>> On 7/07/2022 7:53 pm, Rony G. Flatscher wrote:
 On 06.07.2022 11:03, Seymour J Metz wrote:
>> ... cut ...
 
 There is one ecosystem that beats Perl, Python and practically any others: 
 Java. For every problem domain, for new emerging technologies there are 
 Java class libraries which one can take advantage of. As Java classes get 
 compiled to intermediate byte code, these Java class libraries can be 
 deployed and used immediately on any hardware and any operating system for 
 which a Java virtual machine exists.
>>> 
>>> That's debatable! I'm a full time Java programmer in the last few years and 
>>> I like. We use Spring Boot which is a high quality framework that makes it 
>>> pleasant to use. I would use SB even for a slightly complex command line 
>>> interface. However, the build systems are a bit spotty compared to Node.js, 
>>> Python etc. 
>> Eclipse, NetBeans, IntelliJ, ...
> 
> I build Java in IntelliJ using Maven. Also, we use a DevOps pipeline driven 
> by Jenkins so using an IDE is out of the question.
> 
> 
>>> Maven is creaking with it's ugly XML pom.xml and
>> 
>> Beauty lies in the eyes of the beholder ...
>> 
>> Maven is not Java and still an incredible boon!
> 
> I agree. I just don't like XML. I would rather use Gradle with it's nice 
> Groovy DSL where I can drop down and write code for tricky configurations.
> 
> 
>> 
>>> Gradle doesn't work very well on some systems.
>> 
>> What does not work for you?
>> 
>> Would you think that the Java multiplatform build system which is done with 
>> Gradle would be possible, if that were true what you say?
> 
> Gradle doesn't work properly on z/OS. First thing I tried was to nobble 
> spawning the daemon. I used AOT -Xshareclasses so start up times were not a 
> problem. However, Gradle was downloading lots of unwanted dependencies and 
> filled up the file system cache. I abandoned it and stuck to Maven.
> 
> 
>> 
>>> C# is a far better language then Java. 
>> 
>> Excuse me? 
> 
> Off the top of my header.
> 
> 1. Generics done properly with reflection support, not puny type erasure.
Java retains generics information in byte code (for the compiler) after type 
erasure (such that the runtime does not have to recheck after compilation, 
after all the compiler checked already).

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

> 3. Unsigned integer types
Not really a problem.

> 4. Value types
Not really a problem.

> 5. Better support for functional program, LINQ
How so, which bytecodes do you think of?

> 6. Better enumeration support, with the yield|| statement
Hmm? Actually I would be interested about what you are missing in Java‘s enum 
support.

> I could go on. I don't use C# but I spent a weekend learning it and it's a 
> great language. Kotlin has similar features but is crippled by the JVM. For 
> example, there is no byte code support for unsigned integers.
There is also no real need for it (and if really needed for conversions there 
are the appropriate methods defined in the wrapper classes). 

> 
>> Kotlin meets 95% of the requirements but we dismissed it because it's not 
>> mainstream so we're stuck with Java.
Kotlin is by JetBrains (makers of IntelliJ), Google endorsing it for having a 
Java alternative for creating Android applications. 

„Stuck“ is not really true: Kotlin compiles to Java bytecode which you can use 
as if that bytecode was created by a Java compiler.

The same holds for NetRexx programs: they get transpiled to Java source code 
(you can save that code and inspect it vis-a-vis your NetRexx source code) 
which then gets compiled to Java byte code. The resulting compiled NetRexx 
program in form of the Java bytecode can be used as if it was created by the 
Java compiler (which it did :) ).

>> 
>> Poor you! ;)
>> (You got stuck in one of the most up-to-date and maintained languages and 
>> environments that sets you free from being locked-in in a specific platform.)
>> 
> I use Java every day. I'm happy to use it. But I disagree that it's on of the 
> most up-to-date languages. There differences between Java 8 and Java 16 are 
> so insignificant it's worth upgrading.
> 
> 
>> 
>>> Yes. But you need to use Open Source libraries for it to be easy to use. 
>>> The JRE doesn't cut it.
>> 
>> Hmm?
>> 
>> The JRE includes a wealth of functionality, a wealth of packages that in 
>> other languages are only available as add-ons.
>> 
> However, we still need libraries such as Google Guava, Apache Commons, Lombok 
> to plug the gaps.
> 
> 
>>> 
 
 Seeing the OpenJDK (open-source Java) community and how vigorously Java 
 gets developed further, continually updated in critical areas like 
 security, there is no end in 

Re: Java (Re: Some questions on SYSCALL

2022-07-08 Thread David Crayford

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

On 08.07.2022 03:38, David Crayford wrote:

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


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


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


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


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


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


It gets the Java figures from Maven Central 
https://search.maven.org/stats. There is no denying that Java has an 
gigantic eco-system. And a hell of a lot of it is top notch. The product 
I'm currently working on wouldn't exist without Java open source.






Node.js   2019534
Java       483102
Python  386118
Perl      18354

So the undisputed winner as far as ecosystem is JavaScript. 


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


... cut ...

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


The gripe I have is that what comes with the JRE is typically not as 
good as open source. For example, JDK 11 finally included a half decent 
HttpClient but it doesn't support anyway near the feature set of open 
source clients such as OkHttp or Jetty 
https://www.mocklab.io/blog/which-java-http-client-should-i-use-in-2020/. 
To my knowledge there is still no support for JSON or Yaml even in JDK 18.





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


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

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

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


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


IBM also provide a VSAM I/O module for Go 
https://github.com/ibmruntimes/go-recordio.





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


The REXX programming services on z/OS are built for assembler. Bridging 
to C/C++ can be done. I have code to do that but it's tricky. Porting 
ooRexx to z/OS is very difficult. I actually managed to build it around 
2008. If you look in the oorexx-devel archives you will se conversations 
between myself and Rick McGuire. There is a lot of weird pthread stuff 
intertwined with message passing that made it unsuitable for running in 
an ISPF environment. I put it in the too-hard basket and a a couple of 
years later discovered Lua which was simple to port and unbelievably 
effecient. Several orders of magnitude faster than TSO REXX.




But then, if ooRexx and BSF4ooRexx were there (and they are available 
in the Linux subsystem), then one can use ooRexx to exploit 
com.ibm.jzos.ZFile (there seem to be samples on the Internet that 
demonstrate using it 
).


The first requirement from users on this list would be to run ooRexx 
from TSO. The vast majority of z/OS folks don't know how to use a shell. 
I was speaking to one of our ported tools devs a 

Re: BSF? [was: RE: Java (Re: Some questions on SYSCALL)]

2022-07-08 Thread CM Poncelet
"TSO/E Version 2 Procedures Language MVS/REXX, SC28-1883-1"
 
"Stop disingenuously picking on him." Is that so?
 
The "SYSCALL" in REXX is an ADDRESS SYSCALL under the covers - similar
to ADDRESS IPCS/MVS/TSO/ISREDIT or whatever other else. It is the
"ADDRESS" that belongs in REXX. "SYSCALL" is a CLIST
instruction/directive/function/command/call/enhancement/enterprise/whatever-else,
as per the example I gave of using it.
 
What matters is what SYSCALL does and how it does it - not what it is
called
(instruction/directive/function/command/call/enhancement/enterprise or
whatever-else waffle.)
 
Pardon me, but I am merely a retired systems programming consultant who
did not graduate to hifalutin systems poetry.
 
BTW The spelling "Rexx" applies to non-IBM versions (including Mike
Cowlishaw's.) In IBM's spelling, it is "REXX" (from "Restructed EXtended
eXecutor.")
  
HTH
 

On 08/07/2022 03:12, Paul Gilmartin wrote:
> On Fri, 8 Jul 2022 02:38:38 +0100, CM Poncelet wrote:
>
>> Without meaning to bump into what might be off topic, SYSCALL is
>> actually a CLIST instruction - not a REXX one (unless it's a case of
>> "nous avons changé tout ça")
>>    
> When Charles started this thread on June 28, he made it clear that he
> was discussing Rexx, despite a couple naive errors.  Stop disingenuously
> picking on him.
>
> SYSCALL belongs in Rexx, where it is not an instruction but a
> command environment.
> GIYF: 
> .
>

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


Re: Java (Re: Some questions on SYSCALL

2022-07-08 Thread David Crayford

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

On 07.07.2022 17:45, David Crayford wrote:

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

On 06.07.2022 11:03, Seymour J Metz wrote:

... cut ...


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


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

Eclipse, NetBeans, IntelliJ, ...


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




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


Beauty lies in the eyes of the beholder ...

Maven is not Java and still an incredible boon!


I agree. I just don't like XML. I would rather use Gradle with it's nice 
Groovy DSL where I can drop down and write code for tricky configurations.






Gradle doesn't work very well on some systems.


What does not work for you?

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


Gradle doesn't work properly on z/OS. First thing I tried was to nobble 
spawning the daemon. I used AOT -Xshareclasses so start up times were 
not a problem. However, Gradle was downloading lots of unwanted 
dependencies and filled up the file system cache. I abandoned it and 
stuck to Maven.





C# is a far better language then Java. 


Excuse me? 


Off the top of my header.

1. Generics done properly with reflection support, not puny type erasure.
2. No checked exceptions
3. Unsigned integer types
4. Value types
5. Better support for functional program, LINQ
6. Better enumeration support, with the yield|| statement

I could go on. I don't use C# but I spent a weekend learning it and it's 
a great language. Kotlin has similar features but is crippled by the 
JVM. For example, there is no byte code support for unsigned integers.



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


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


I use Java every day. I'm happy to use it. But I disagree that it's on 
of the most up-to-date languages. There differences between Java 8 and 
Java 16 are so insignificant it's worth upgrading.





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


Hmm?

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


However, we still need libraries such as Google Guava, Apache Commons, 
Lombok to plug the gaps.







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


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


Flabby? 
ROTFL


I stand by my comment. It doesn't mean I dislike Java. I like it a lot.




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


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


Yes it is. I work on z/OS performance monitoring products. One of our 
monitors is for the z/OS JVM. I see the metrics every day. The JVM 
starts about 8 threads. 2 for JIT, 3 for GC, 3 for OMR and some others I 
can't remember. It will do that even if you run a hello world program. 
Some of our products are written
in Java and we have to write documentation on how to tune the heap so GC 
cycles don't go crazy. Memory requirements for Java is eye watering 
compared to native code. The equivalent product written in C++ would use 
a fraction of the resources. One of the big plus point for Java on z/OS 
is that it runs on zIIP processors.


We use Spring Boot and are keeping an eye on Spring Boot Native which 
compiles to native code using GraalVM. As containers become the dominant 
deployment environment this will make a big difference for Java 

Re: Java (Re: Some questions on SYSCALL

2022-07-08 Thread Rony G. Flatscher

On 08.07.2022 03:38, David Crayford wrote:

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


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

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


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


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


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



Node.js   2019534
Java       483102
Python  386118
Perl      18354

So the undisputed winner as far as ecosystem is JavaScript. 


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


... cut ...

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

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


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

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

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


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

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


But then, if ooRexx and BSF4ooRexx were there (and they are available in the Linux subsystem), then 
one can use ooRexx to exploit com.ibm.jzos.ZFile (there seem to be samples on the Internet that 
demonstrate using it 
).


---rony


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


Re: Java (Re: Some questions on SYSCALL

2022-07-08 Thread Rony G. Flatscher

On 07.07.2022 17:45, David Crayford wrote:

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

On 06.07.2022 11:03, Seymour J Metz wrote:

... cut ...


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


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

Eclipse, NetBeans, IntelliJ, ...

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


Beauty lies in the eyes of the beholder ...

Maven is not Java and still an incredible boon!


Gradle doesn't work very well on some systems.


What does not work for you?

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


C# is a far better language then Java. 


Excuse me? 

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


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


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


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



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


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



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


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


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

... cut ...





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


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


Hmm?

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






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


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


Flabby? 
ROTFL


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


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


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

GraalVM is a valiant attempt to solve that problem. 


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


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

Re: BSF? [was: RE: Java (Re: Some questions on SYSCALL)]

2022-07-07 Thread Paul Gilmartin
On Fri, 8 Jul 2022 02:38:38 +0100, CM Poncelet wrote:

>Without meaning to bump into what might be off topic, SYSCALL is
>actually a CLIST instruction - not a REXX one (unless it's a case of
>"nous avons changé tout ça")
>   
When Charles started this thread on June 28, he made it clear that he
was discussing Rexx, despite a couple naive errors.  Stop disingenuously
picking on him.

SYSCALL belongs in Rexx, where it is not an instruction but a
command environment.
GIYF: 
.

-- 
gil

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


Re: Java (Re: Some questions on SYSCALL

2022-07-07 Thread David Crayford

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


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


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


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


Node.js   2019534
Java       483102
Python  386118
Perl      18354

So the undisputed winner as far as ecosystem is JavaScript. And it's 
growing the fastest. I just downloaded vsam.js to process a VSAM data 
set in Node on z/OS and it works well. IBM are certainly giving

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

https://www.npmjs.com/package/vsam.js?S_TACT=


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


Re: BSF? [was: RE: Java (Re: Some questions on SYSCALL)]

2022-07-07 Thread CM Poncelet
Without meaning to bump into what might be off topic, SYSCALL is
actually a CLIST instruction - not a REXX one (unless it's a case of
"nous avons changé tout ça")
 
E.g.
HELP_SELECT: +
 SELECT ()
   WHEN (UP) DO
 SET HPAN =  - 1
 *SYSCALL* MAXV HPAN HELPTOP
 ENDO
   WHEN (DOWN) DO
 SET HPAN =  + 1
 *SYSCALL* MINV HPAN HELPBOT
 ENDO
   OTHERWISE
   ENDO HELP_SELECT
 ISPEXEC DISPLAY PANEL(HELPANL)
 ENDO
<...>
/*---*/
/* SUB-PROCEDURE MINV    */
/*---*/
MINV: +
  PROC 0 +
    HPAN HELPBOT
  CONTROL END(ENDO)
  SYSREF +
    HPAN HELPBOT
  IF () > () THEN +
    SET HPAN = 
  ELSE
  RETURN
  ENDO MINV
/*---*/
/* SUB-PROCEDURE MAXV    */
/*---*/
MAXV: +
  PROC 0 +
    HPAN HELPTOP
  CONTROL END(ENDO)
  SYSREF +
    HPAN HELPTOP
  IF () < () THEN +
    SET HPAN = 
  ELSE
  RETURN
  ENDO MAXV
 


On 07/07/2022 19:01, Paul Gilmartin wrote:
> (This thread should move to comp.lang.advocacy.)
>
> On Thu, 7 Jul 2022 16:40:08 +, Farley, Peter x23353 wrote:
>
>> OK, I'll bite: What is BSF please?  I do know of PCRE (though I really do 
>> not like the Perl RE syntax, I prefer Posix/gawk RE syntax) but BSF is a new 
>> acronym to me.
>>
> I try to keep my skill set portable.  I avoid Bash-isms, {g|n}awk, ...  Now 
> that you say PCRE
> is different, my interest in it is diminished.
>
> It seems to me that many users of {g|n}awk learned a primitive awk lacking 
> many features
> such as tolowerr(), touppor(), the "in" operator, ... now assimilated in 
> POSIX awk.
>  

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


Re: BSF? [was: RE: Java (Re: Some questions on SYSCALL)]

2022-07-07 Thread Seymour J Metz
I don't like any RE syntax that derives from Eunix, but it's too powerful to 
ignore, especially the flavors that have named captures. Unless I'm compelkled 
toi use something with POSIX syntax, I stick to more powerful versions.


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


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Paul Gilmartin [042bfe9c879d-dmarc-requ...@listserv.ua.edu]
Sent: Thursday, July 7, 2022 2:01 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: BSF? [was: RE: Java (Re: Some questions on SYSCALL)]

(This thread should move to comp.lang.advocacy.)

On Thu, 7 Jul 2022 16:40:08 +, Farley, Peter x23353 wrote:

>OK, I'll bite: What is BSF please?  I do know of PCRE (though I really do not 
>like the Perl RE syntax, I prefer Posix/gawk RE syntax) but BSF is a new 
>acronym to me.
>
I try to keep my skill set portable.  I avoid Bash-isms, {g|n}awk, ...  Now 
that you say PCRE
is different, my interest in it is diminished.

It seems to me that many users of {g|n}awk learned a primitive awk lacking many 
features
such as tolowerr(), touppor(), the "in" operator, ... now assimilated in POSIX 
awk.

--
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: BSF? [was: RE: Java (Re: Some questions on SYSCALL)]

2022-07-07 Thread Paul Gilmartin
(This thread should move to comp.lang.advocacy.)

On Thu, 7 Jul 2022 16:40:08 +, Farley, Peter x23353 wrote:

>OK, I'll bite: What is BSF please?  I do know of PCRE (though I really do not 
>like the Perl RE syntax, I prefer Posix/gawk RE syntax) but BSF is a new 
>acronym to me.
> 
I try to keep my skill set portable.  I avoid Bash-isms, {g|n}awk, ...  Now 
that you say PCRE
is different, my interest in it is diminished.

It seems to me that many users of {g|n}awk learned a primitive awk lacking many 
features
such as tolowerr(), touppor(), the "in" operator, ... now assimilated in POSIX 
awk.
 
-- 
gil

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


Re: BSF? [was: RE: Java (Re: Some questions on SYSCALL)]

2022-07-07 Thread Seymour J Metz
bsf4oorexx is a bridge between oorexx and java; it lets an oorexx programmer 
use java classes and methods.


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


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Farley, Peter x23353 [031df298a9da-dmarc-requ...@listserv.ua.edu]
Sent: Thursday, July 7, 2022 12:40 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: BSF? [was: RE: Java (Re: Some questions on SYSCALL)]

OK, I'll bite: What is BSF please?  I do know of PCRE (though I really do not 
like the Perl RE syntax, I prefer Posix/gawk RE syntax) but BSF is a new 
acronym to me.

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Seymour J Metz
Sent: Thursday, July 7, 2022 8:55 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Java (Re: Some questions on SYSCALL



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

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

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


BSF? [was: RE: Java (Re: Some questions on SYSCALL)]

2022-07-07 Thread Farley, Peter x23353
OK, I'll bite: What is BSF please?  I do know of PCRE (though I really do not 
like the Perl RE syntax, I prefer Posix/gawk RE syntax) but BSF is a new 
acronym to me.

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Seymour J Metz
Sent: Thursday, July 7, 2022 8:55 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Java (Re: Some questions on SYSCALL



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

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: Java (Re: Some questions on SYSCALL

2022-07-07 Thread David Crayford

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

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


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


Perls moribund. It's fallen off a cliff since it's heyday. Same with 
Ruby. Poorly designed programming languages only last as long as there 
is nothing better to replace them.


https://trends.google.com/trends/explore?date=all=%2Fm%2F05zrn



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


That's debatable! I'm a full time Java programmer in the last few years 
and I like. We use Spring Boot which is a high quality framework that 
makes it pleasant to use. I would use SB even for a slightly complex 
command line interface. However, the build systems are a bit spotty 
compared to Node.js, Python etc. Maven is creaking with it's ugly XML 
pom.xml and Gradle doesn't work very well on some systems. In 
particular, z/OS. C# is a far better language then Java. I don't use it 
because I because I'm not a Windows guy but I look on in envy. Kotlin 
meets 95% of the requirements but we dismissed it because it's not 
mainstream so we're stuck with Java.


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


Since C++11 the language has evolved into a language that some experts 
have called Pythonic [1]. We're using the new z/OS Open XL C/C++ and 
it's a breath of fresh air. You need to be a good programmer to be 
proficient at C++ but IBM are delivering the goods on z/OS.


[1] https://preshing.com/20141202/cpp-has-become-more-pythonic/




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


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




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


One of the reasons for the surge in C++ is because Java is flabby. It's 
uses a huge amount of memory and GC is costly in visualized 
environments. GraalVM is a valiant attempt to solve that problem. 
Hopefully OpenJ9 will do something similar.


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


Re: Java (Re: Some questions on SYSCALL

2022-07-07 Thread Rony G. Flatscher

On 07.07.2022 14:54, Seymour J Metz wrote:

Which of these has Java equivalents?

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


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

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


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


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

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



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

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


You are welcome!

---rony




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

On 06.07.2022 11:03, Seymour J Metz wrote:

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

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

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

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

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

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

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

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

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

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

 dim~setSize(555,222)/* chang

Re: Java (Re: Some questions on SYSCALL

2022-07-07 Thread Seymour J Metz
Which of these has Java equivalents?

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


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

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


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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

Running the above ooRexx program yields:

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


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

<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.oracle.com%2Fjavase%2F8%2Fdocs%2Fapi%2Findex.html%3Fjavax%2Fscript%2Fpackage-summary.htmldata=05%7C01%7Csmetz3%40g

Java (Re: Some questions on SYSCALL

2022-07-07 Thread Rony G. Flatscher
rom that moment on you have access to *all* Java 
class libraries on *all* operating systems: this makes a wealth of libraries immediatley available 
to ooRexx that does not possibly exist for Perl, Python, Ruby and the like.


So the combination ooRexx+Java is hard to beat when it comes to looking for ubiquitous functionality 
that you want to use from ooRexx instantly. And both are free.


---rony

[1] ooRexx 5: <https://sourceforge.net/projects/oorexx/files/oorexx/5.0.0beta/>

[2] BSF4ooRexx: 
<https://sourceforge.net/projects/bsf4oorexx/files/GA/BSF4ooRexx-641.20220131-GA/>

[3] ooRexx-Plugin for IntelliJ: 
<https://sourceforge.net/projects/bsf4oorexx/files/Sandbox/aseik/ooRexxIDEA/GA/2.1.0/>





____
From: IBM Mainframe Discussion List  on behalf of Bernd 
Oppolzer
Sent: Wednesday, June 29, 2022 5:52 PM
To:IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

The only reason why your Python code is shorter is because you use
the builtin os.walk method to walk through the directory recursively.
A similar method could have been used in my REXX example, too,
but I wanted a command to be issued in every subdirectory
when walking through the tree,
so I had to do the recursive directory walk myself, using the recursive
call
to the tree procedure. This is what makes my coding longer,
but this is not due to the REXX language. Be fair.

To call this verbose is simply wrong, and you are missing the point
completely;
please show me how your Python solution looks, if you also walk the
directory tree
by yourself and issue a command given as a parameter at every subdirectory
and not only print the name.

but I don't really want to argue on this ... this seems like a waste ot
time.

I use the tools I have at hand ... and I didn't have Python in 1998 on
my OS/2 boxes.
This has nothing to do with personal favor; I use the tools which make
the most
sense for me, given my knowledge or my personal skills (which can of course
change or improve over time).

Earlier in a similar thread I told you or other posters how easy it is
to append
small pieces of information every 15 minutes to a file using IBM's C
and still having a large blocksize etc. ... and how I would support
the simultaneous update and the reporting. The thread degraded into a
discussion about started tasks and how to implement the operator commands
to control the STCs using REXX or other languages ... again: what a
waste of time.
For appending information to a file every 15 minutes, I would create a
batch job
which is started every 15 minutes, controlled by UC4 or cron or whatever
you have
... and which terminates after some milliseconds. No need for a started
task,
which is idle most of the time.

I miss sometimes a certain cost sensitivity with the discussions here in
IBM-MAIN,
but this should be part of our profession.

Kind regards

Bernd



Am 29.06.2022 um 23:24 schrieb David Crayford:

On 30/06/2022 4:22 am, Bernd Oppolzer wrote:

This is an old OS/2 REXX program (from the 1990s, IIRC),
used to traverse a directory tree recursively and issue a command in
every subdirectory found:


/* rexx */

arg command

call RxFuncAdd "SysLoadFuncs", "REXXUTIL", "SysLoadFuncs"
call SysLoadFuncs

dir = directory()
if right(dir,1) = "\" then
dir = left(dir, length(dir) - 1)

call tree dir, command

x = directory(dir)

exit


tree: procedure

arg dir, command

say "*** Verzeichnis in Bearbeitung: "dir" ***"

x = directory(dir)

command

rc = SysFileTree("*.*", verz, "D")
do i = 1 to verz.0
   dir = word(verz.i, 5)
   call tree dir, command
end

return


you may notice the recursive call of the procedure "tree".

I don't see any justification for your REXX bashing;
it's just another flavor of scripting language, which allows to do
great things,
once you manage to use it.

Sorry Brend, but I don't consider that snippet to be great! It's a
perfect example of flabby, verbose REXX code. The only justification
for using REXX is that you personally favor the language. Python is
far more succinct.

|for| |root, dirs, files ||in| |os.walk(path_of_the_directory):|
|||for| |i ||in| |files:|
|||print||(os.path.join(root, i))|



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


Re: Some questions on SYSCALL

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


From: IBM Mainframe Discussion List  on behalf of 
Bernd Oppolzer 
Sent: Wednesday, June 29, 2022 5:52 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

The only reason why your Python code is shorter is because you use
the builtin os.walk method to walk through the directory recursively.
A similar method could have been used in my REXX example, too,
but I wanted a command to be issued in every subdirectory
when walking through the tree,
so I had to do the recursive directory walk myself, using the recursive
call
to the tree procedure. This is what makes my coding longer,
but this is not due to the REXX language. Be fair.

To call this verbose is simply wrong, and you are missing the point
completely;
please show me how your Python solution looks, if you also walk the
directory tree
by yourself and issue a command given as a parameter at every subdirectory
and not only print the name.

but I don't really want to argue on this ... this seems like a waste ot
time.

I use the tools I have at hand ... and I didn't have Python in 1998 on
my OS/2 boxes.
This has nothing to do with personal favor; I use the tools which make
the most
sense for me, given my knowledge or my personal skills (which can of course
change or improve over time).

Earlier in a similar thread I told you or other posters how easy it is
to append
small pieces of information every 15 minutes to a file using IBM's C
and still having a large blocksize etc. ... and how I would support
the simultaneous update and the reporting. The thread degraded into a
discussion about started tasks and how to implement the operator commands
to control the STCs using REXX or other languages ... again: what a
waste of time.
For appending information to a file every 15 minutes, I would create a
batch job
which is started every 15 minutes, controlled by UC4 or cron or whatever
you have
... and which terminates after some milliseconds. No need for a started
task,
which is idle most of the time.

I miss sometimes a certain cost sensitivity with the discussions here in
IBM-MAIN,
but this should be part of our profession.

Kind regards

Bernd



Am 29.06.2022 um 23:24 schrieb David Crayford:
> On 30/06/2022 4:22 am, Bernd Oppolzer wrote:
>>>
>> This is an old OS/2 REXX program (from the 1990s, IIRC),
>> used to traverse a directory tree recursively and issue a command in
>> every subdirectory found:
>>
>>
>> /* rexx */
>>
>> arg command
>>
>> call RxFuncAdd "SysLoadFuncs", "REXXUTIL", "SysLoadFuncs"
>> call SysLoadFuncs
>>
>> dir = directory()
>> if right(dir,1) = "\" then
>>dir = left(dir, length(dir) - 1)
>>
>> call tree dir, command
>>
>> x = directory(dir)
>>
>> exit
>>
>>
>> tree: procedure
>>
>>arg dir, command
>>
>>say "*** Verzeichnis in Bearbeitung: "dir" ***"
>>
>>x = directory(dir)
>>
>>command
>>
>>rc = SysFileTree("*.*", verz, "D")
>>do i = 1 to verz.0
>>   dir = word(verz.i, 5)
>>   call tree dir, command
>>end
>>
>>return
>>
>>
>> you may notice the recursive call of the procedure "tree".
>>
>> I don't see any justification for your REXX bashing;
>> it's just another flavor of scripting language, which allows to do
>> great things,
>> once you manage to use it.
>
> Sorry Brend, but I don't consider that snippet to be great! It's a
> perfect example of flabby, verbose REXX code. The only justification
> for using REXX is that you personally favor the language. Python is
> far more succinct.
>
> |for| |root, dirs, files ||in| |os.walk(path_of_the_directory):|
> |||for| |i ||in| |files:|
> |||print||(os.path.join(root, i))|
>
>
> --
> 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: Ad importance of the message paradigm (Re: Secure sockets (Re: Some questions on SYSCALL

2022-07-03 Thread Rony G. Flatscher

Hi Bob,

On 02.07.2022 22:06, Bob Bridges wrote:

Rony, could you (or someone) say more about that?  The ooRexx documentation has 
a lot to say about messaging, which is a bit confusing to me because I first 
got a handle on OOP in VBA and VBSCript, which do not.


VBA and VBS would allow referring to "third party (COM) objects" which can be seen as instances of 
structures/classes. They allow for dereferencing structures/classes, refer to fields/attributes and 
procedures/functions/methods (and invoke the latter) of such structures/classes. As 
structures/classes can be nested one can use the dot to dereference further.


So VBA and VBS per se have not been object-oriented programming languages in the sense that they 
would allow for defining (nested) structures/classes that they could instantiate; neither was 
possible with VB (with the exception that Microsoft defined VB programs with forms to be classes 
that can be instantiated) where today links usually refer to/cite VB.Net which is not VB.


VB.Net on the other hand, being a citizen of Microsoft's .NET/CLR framework allows for defining 
explicitly classes. VB.Net gets compiled to the .NET bytecode CLI (a.k.a. MSIL), which also C# gets 
compiled to and other such .NET/CLR languages.



If the big idea is messaging, does VBA do that and I just didn't notice?  Or 
are the VB flavors something different that don't do messaging, or not very 
much?


VBA, VBScript, VB and VB.Net (also all other .Net/CLR languages) do not implement the message 
paradigm (System.Message refers to message queuing).


If a language implements the message paradigm then it usually uses messages as first class objects 
(FCO) sometimes making its functionality fully available to the programmer like ooRexx.


Here a small example:

   a="... tsil niaM-MBI ,olleH"
   say "1) BIF :" reverse(a)-- reverse BIF (built-in function)

   say "2) message :" a~reverse -- sending a message to the string 
value/object/instance

   strMsg="reverse"  -- define name of the message
   say "3) a~send  :" a~send(strMsg)-- send the message strMsg defines to the 
string value/object/instance

   msg=.message~new(a,"reverse")
   say "4) msg~send:" msg~send

   msg=.message~new(a,"reverse")
   msg~start
   say "5) msg~start, followed by msg~result:" msg~result

Comments:

1. normal REXX reverse BIF

2. ooRexx alternative: send the 'reverse' message to the string 
object/value/instance

3. allow the message to be sent to be stored in the variable named "strMsg" and 
sent via the
   message "send" that each value/object/instance can understand (find the 
method named like the
   received message), reason being, that the ooRexx root class implements the 
"send" method which
   can therefore be always found due to inheritance; this adds a *lot* of 
flexibility to the
   language already

4. here the ooRexx .Message class gets used to create a value/object/instance 
that defines the
   receiver (the string value/object/instance referred to by the variable 'a') 
and the message name
   'reverse); this time the message gets sent off synchronically with the message 
"send" which
   means that execution blocks until the message returns with the result; this 
adds a *lot* of
   flexibility to the language as you may see

5. here the ooRexx .Message class gets used to create a value/object/instance 
that defines the
   receiver (the string value/object/instance referred to by the variable 'a') 
and the message name
   'reverse); this time the message gets sent off *Asynch*ronically with the Message 
"start":
   ooRexx will now create a new thread and have the message lookup execute on 
another thread. In
   order to fetch the result later we just need to send the 'result' message to 
the message object;
   this adds a *lot* of flexibility to the language as you may see.

Here the output of running the above program in ooRexx 5.0:

   1) BIF : Hello, IBM-Main list ...
   2) message : Hello, IBM-Main list ...
   3) a~send  : Hello, IBM-Main list ...
   4) msg~send: Hello, IBM-Main list ...
   5) msg~start, followed by msg~result: Hello, IBM-Main list ...

There is more to this, but you see among other things how easy it is in ooRexx to have messages 
execute on separate threads if need be. You could even use the ooRexx .Alarm class to start a 
message at a later time (e.g. in five minutes or at a certain date at a certain time like at the end 
of July at 23:59) and being able to cancel it if it has not been sent yet.


---

The interesting thing is that the message paradigm allows for new, maybe more efficient problem 
solutions for certain problems. E.g. while seeing my students having difficulties when creating Java 
GUIs with awt/swing and with JavaFX, even if they were fully aware of the importance of interacting 
with the GUI objects on the GUI thread, even if they knew about techniques how to achieve that, they 
would get into problems when using larger programs with complex interaction 

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

2022-07-03 Thread Seymour J Metz
There are a lot of theological arguments about what is or is not an 
object-oriented language. The basic idea is that objects send messages to other 
objects, and that some message delay the sending object until the receiver 
sneds a response, will other messages allow the sender to run asynchronously 
with the receiving object. Methodfs are built on top of that.


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


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of Bob 
Bridges [robhbrid...@gmail.com]
Sent: Saturday, July 2, 2022 4:06 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Ad importance of the message paradigm (Re: Secure sockets (Re: 
Some questions on SYSCALL

Rony, could you (or someone) say more about that?  The ooRexx documentation has 
a lot to say about messaging, which is a bit confusing to me because I first 
got a handle on OOP in VBA and VBSCript, which do not.  If the big idea is 
messaging, does VBA do that and I just didn't notice?  Or are the VB flavors 
something different that don't do messaging, or not very much?

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

/* It is in vain to say that democracy is less vain, less proud, less selfish, 
less ambitious, or less avaricious than aristocracy or monarchyWhen clear 
prospects are opened before vanity, pride, avarice, or ambition, for their easy 
gratification, it is hard for the most considerate philosophers and the most 
conscientious moralists to resist the temptation. Individuals have conquered 
themselves. Nations and large bodies of men, never.  -from "The Letters of John 
and Abigail Adams" */

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

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

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

Cf. 
<https://secure-web.cisco.com/1M2FMmo9KD7XBMhnhVNEqL_PCk_U2u-opXfiaRy4Bpo2SxWbPs-4000_Jyqe2uRLB_ptvUbRhYHtW6p7c8NbowQwdeUJ3nP193MZR6NvBuQ6SCzw11qfV5VNBbxuTXm1QidA59kvD8te387l4aGm29IeuIo8lDT4tvrTq1q7HfAhMgVh1UsA7rq6cANNrKdxbiBk-3JXibY6ooouWsg7F5UDnC-FqhqlSBqpJIqe2Fx7SZ5q_fqvg87epYOPJARM9TG3Hd77Zf7PjrNR9g2H1lhOCsvdAZT2kD51Hkrmok7Y6_3s-z4dsu4ZqHTgNjVoL1MFp-0wBPqAOWz1usLCyeVTKmzogj5DHtx2EdPYh4CogBVDxQrtmq_jSRylVLh6LVOn9rz3tPRVSHxzx6aj6Jxwl3uRMNfZXoFjsZcTtNYsoR9Fsq29V97WCfpJWKvGI/https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FAlan_Kay%23cite_ref-8>.

--
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: Ad importance of the message paradigm (Re: Secure sockets (Re: Some questions on SYSCALL

2022-07-03 Thread Seymour J Metz
Well, Alonzo Church Published The Calculi of Lambda Conversion in 1941, which 
influenced LISP; Church, Goedel and Turing all had an influence. Simula played 
a big role in the history of object-oriented languages, prior to Smalltalk.


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


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Rupert Reynolds [rreyno...@cix.co.uk]
Sent: Sunday, July 3, 2022 6:51 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Ad importance of the message paradigm (Re: Secure sockets (Re: 
Some questions on SYSCALL

The thing about Smalltalk (and a lot of other developments) is just how old
they are. And we keep re-inventing some things. Smalltalk was remarkable in
1970-ish. Lambdas in Algol-68, but it wasn't the first I believe, and they
can be tracked back further to maths in 1932.

Great insights in the 1968 NATO conference on "Software Engineering".

TDD can be traced back to awk and further bsck than that, I reckon.

I think a lot of Alan Kay's energy is frustration that everything takes so
long!

Roops

On Sun, 3 Jul 2022, 03:47 David Crayford,  wrote:

> He wasn't too complementary about Java either. I never used Smalltalk
> but I've seen examples in the GoF Design Patterns book. Guys I've spoken
> to that used it extensively talk very fondly about it.
>
> On 3/07/2022 5:37 am, Rupert Reynolds wrote:
> > I can't remember which of Alan Kay's talks it's in, but I have a few of
> his
> > saved and one or two have him saying "the big idea is messaging" and
> > something like "whatever I had in mind, I can tell you now it wasn't C++"
> > :-)
> >
> > The late great Joe Armstrong (of Erlang fame) also quoted Alan Kay on
> this
> > at least once.
> >
> > In my opinion, a lot of language development jumped on the OO bandwagon
> > without thinking things through properly.
> >
> > Roops
> >
> > On Sat, 2 Jul 2022, 21:06 Bob Bridges,  wrote:
> >
> >> Rony, could you (or someone) say more about that?  The ooRexx
> >> documentation has a lot to say about messaging, which is a bit
> confusing to
> >> me because I first got a handle on OOP in VBA and VBSCript, which do
> not.
> >> If the big idea is messaging, does VBA do that and I just didn't notice?
> >> Or are the VB flavors something different that don't do messaging, or
> not
> >> very much?
> >>
> >> ---
> >> Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313
> >>
> >> /* It is in vain to say that democracy is less vain, less proud, less
> >> selfish, less ambitious, or less avaricious than aristocracy or
> >> monarchyWhen clear prospects are opened before vanity, pride,
> avarice,
> >> or ambition, for their easy gratification, it is hard for the most
> >> considerate philosophers and the most conscientious moralists to resist
> the
> >> temptation. Individuals have conquered themselves. Nations and large
> bodies
> >> of men, never.  -from "The Letters of John and Abigail Adams" */
> >>
> >> -Original Message-
> >> From: IBM Mainframe Discussion List  On
> Behalf
> >> Of Rony G. Flatscher
> >> Sent: Saturday, July 2, 2022 15:05
> >>
> >> Alan Kay is regarded to have coined the term "object-oriented
> programming
> >> (OOP)" in the context of his work while at PARC. He is being cited on
> >> Wikipedia:
> >>
> >>  I'm sorry that I long ago coined the term "objects" for this topic
> >> because it gets many people
> >>  to focus on the lesser idea. The big idea is "messaging".[8]
> >>
> >> Cf. 
> >> <https://secure-web.cisco.com/1D9yrUIx4AcfqavEKxisNw3G-hlmU-BVJGHPXxpWPvDRuaA6FyzMNyNtZsupmkDeFmuOzXGjw37B3EVOx8MYduhczpqlqVPCPLSmG6mgr15CvwHCp1MaXPkyVJTR45e8s70eMR3PMwKeD4QgMX-4kgtmhbDgbSWQmK7H3gxiYfcB9JT40GS54_QlA65IukKG9gZ1ykKfF8gPBGSaCsIB_1ZvwdoNd27CoDsKhusZTU0jdZrh970CawclyZ2quixPPpa3KysvSZCUzcv6h5aKXHZbpPamzaMZ4brzZkJw_nVVRM7_6to4NYRa41uhWBpUp5koSoEUZay6oSjg2QSGonPb93PDM8XTDhOgFrFCuK8EdSRxfr6km_ngL9R7GOKSGvJvRLwBt_L_M2VoLzmM7ZvQPowdZEVhwM0gmGm_CNSyuZymlbCDshUgJDTgQDlio/https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FAlan_Kay%23cite_ref-8>.
> >>
> >> --
> >> For IBM-MAIN subscribe / signoff / archive access instructions,
> >> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
> >>
> > --
> &

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

2022-07-03 Thread Rupert Reynolds
Yes, perhaps the best example :-)

On Sun, 3 Jul 2022, 12:01 David Crayford,  wrote:

> IIRC Lisp was designed in 1956. That must have been ground breaking at the
> time.
>
> > On 3 Jul 2022, at 18:51, Rupert Reynolds  wrote:
> >
> > The thing about Smalltalk (and a lot of other developments) is just how
> old
> > they are. And we keep re-inventing some things. Smalltalk was remarkable
> in
> > 1970-ish. Lambdas in Algol-68, but it wasn't the first I believe, and
> they
> > can be tracked back further to maths in 1932.
> >
> > Great insights in the 1968 NATO conference on "Software Engineering".
> >
> > TDD can be traced back to awk and further bsck than that, I reckon.
> >
> > I think a lot of Alan Kay's energy is frustration that everything takes
> so
> > long!
> >
> > Roops
>
>

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


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

2022-07-03 Thread David Crayford
IIRC Lisp was designed in 1956. That must have been ground breaking at the 
time. 

> On 3 Jul 2022, at 18:51, Rupert Reynolds  wrote:
> 
> The thing about Smalltalk (and a lot of other developments) is just how old
> they are. And we keep re-inventing some things. Smalltalk was remarkable in
> 1970-ish. Lambdas in Algol-68, but it wasn't the first I believe, and they
> can be tracked back further to maths in 1932.
> 
> Great insights in the 1968 NATO conference on "Software Engineering".
> 
> TDD can be traced back to awk and further bsck than that, I reckon.
> 
> I think a lot of Alan Kay's energy is frustration that everything takes so
> long!
> 
> Roops
> 
>> On Sun, 3 Jul 2022, 03:47 David Crayford,  wrote:
>> 
>> He wasn't too complementary about Java either. I never used Smalltalk
>> but I've seen examples in the GoF Design Patterns book. Guys I've spoken
>> to that used it extensively talk very fondly about it.
>> 
>>> On 3/07/2022 5:37 am, Rupert Reynolds wrote:
>>> I can't remember which of Alan Kay's talks it's in, but I have a few of
>> his
>>> saved and one or two have him saying "the big idea is messaging" and
>>> something like "whatever I had in mind, I can tell you now it wasn't C++"
>>> :-)
>>> 
>>> The late great Joe Armstrong (of Erlang fame) also quoted Alan Kay on
>> this
>>> at least once.
>>> 
>>> In my opinion, a lot of language development jumped on the OO bandwagon
>>> without thinking things through properly.
>>> 
>>> Roops
>>> 
 On Sat, 2 Jul 2022, 21:06 Bob Bridges,  wrote:
>>> 
 Rony, could you (or someone) say more about that?  The ooRexx
 documentation has a lot to say about messaging, which is a bit
>> confusing to
 me because I first got a handle on OOP in VBA and VBSCript, which do
>> not.
 If the big idea is messaging, does VBA do that and I just didn't notice?
 Or are the VB flavors something different that don't do messaging, or
>> not
 very much?
 
 ---
 Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313
 
 /* It is in vain to say that democracy is less vain, less proud, less
 selfish, less ambitious, or less avaricious than aristocracy or
 monarchyWhen clear prospects are opened before vanity, pride,
>> avarice,
 or ambition, for their easy gratification, it is hard for the most
 considerate philosophers and the most conscientious moralists to resist
>> the
 temptation. Individuals have conquered themselves. Nations and large
>> bodies
 of men, never.  -from "The Letters of John and Abigail Adams" */
 
 -Original Message-
 From: IBM Mainframe Discussion List  On
>> Behalf
 Of Rony G. Flatscher
 Sent: Saturday, July 2, 2022 15:05
 
 Alan Kay is regarded to have coined the term "object-oriented
>> programming
 (OOP)" in the context of his work while at PARC. He is being cited on
 Wikipedia:
 
 I'm sorry that I long ago coined the term "objects" for this topic
 because it gets many people
 to focus on the lesser idea. The big idea is "messaging".[8]
 
 Cf. .
 
 --
 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
>> 
> 
> --
> 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: Ad importance of the message paradigm (Re: Secure sockets (Re: Some questions on SYSCALL

2022-07-03 Thread Rupert Reynolds
The thing about Smalltalk (and a lot of other developments) is just how old
they are. And we keep re-inventing some things. Smalltalk was remarkable in
1970-ish. Lambdas in Algol-68, but it wasn't the first I believe, and they
can be tracked back further to maths in 1932.

Great insights in the 1968 NATO conference on "Software Engineering".

TDD can be traced back to awk and further bsck than that, I reckon.

I think a lot of Alan Kay's energy is frustration that everything takes so
long!

Roops

On Sun, 3 Jul 2022, 03:47 David Crayford,  wrote:

> He wasn't too complementary about Java either. I never used Smalltalk
> but I've seen examples in the GoF Design Patterns book. Guys I've spoken
> to that used it extensively talk very fondly about it.
>
> On 3/07/2022 5:37 am, Rupert Reynolds wrote:
> > I can't remember which of Alan Kay's talks it's in, but I have a few of
> his
> > saved and one or two have him saying "the big idea is messaging" and
> > something like "whatever I had in mind, I can tell you now it wasn't C++"
> > :-)
> >
> > The late great Joe Armstrong (of Erlang fame) also quoted Alan Kay on
> this
> > at least once.
> >
> > In my opinion, a lot of language development jumped on the OO bandwagon
> > without thinking things through properly.
> >
> > Roops
> >
> > On Sat, 2 Jul 2022, 21:06 Bob Bridges,  wrote:
> >
> >> Rony, could you (or someone) say more about that?  The ooRexx
> >> documentation has a lot to say about messaging, which is a bit
> confusing to
> >> me because I first got a handle on OOP in VBA and VBSCript, which do
> not.
> >> If the big idea is messaging, does VBA do that and I just didn't notice?
> >> Or are the VB flavors something different that don't do messaging, or
> not
> >> very much?
> >>
> >> ---
> >> Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313
> >>
> >> /* It is in vain to say that democracy is less vain, less proud, less
> >> selfish, less ambitious, or less avaricious than aristocracy or
> >> monarchyWhen clear prospects are opened before vanity, pride,
> avarice,
> >> or ambition, for their easy gratification, it is hard for the most
> >> considerate philosophers and the most conscientious moralists to resist
> the
> >> temptation. Individuals have conquered themselves. Nations and large
> bodies
> >> of men, never.  -from "The Letters of John and Abigail Adams" */
> >>
> >> -Original Message-
> >> From: IBM Mainframe Discussion List  On
> Behalf
> >> Of Rony G. Flatscher
> >> Sent: Saturday, July 2, 2022 15:05
> >>
> >> Alan Kay is regarded to have coined the term "object-oriented
> programming
> >> (OOP)" in the context of his work while at PARC. He is being cited on
> >> Wikipedia:
> >>
> >>  I'm sorry that I long ago coined the term "objects" for this topic
> >> because it gets many people
> >>  to focus on the lesser idea. The big idea is "messaging".[8]
> >>
> >> Cf. .
> >>
> >> --
> >> 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
>

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


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

2022-07-02 Thread David Crayford
He wasn't too complementary about Java either. I never used Smalltalk 
but I've seen examples in the GoF Design Patterns book. Guys I've spoken 
to that used it extensively talk very fondly about it.


On 3/07/2022 5:37 am, Rupert Reynolds wrote:

I can't remember which of Alan Kay's talks it's in, but I have a few of his
saved and one or two have him saying "the big idea is messaging" and
something like "whatever I had in mind, I can tell you now it wasn't C++"
:-)

The late great Joe Armstrong (of Erlang fame) also quoted Alan Kay on this
at least once.

In my opinion, a lot of language development jumped on the OO bandwagon
without thinking things through properly.

Roops

On Sat, 2 Jul 2022, 21:06 Bob Bridges,  wrote:


Rony, could you (or someone) say more about that?  The ooRexx
documentation has a lot to say about messaging, which is a bit confusing to
me because I first got a handle on OOP in VBA and VBSCript, which do not.
If the big idea is messaging, does VBA do that and I just didn't notice?
Or are the VB flavors something different that don't do messaging, or not
very much?

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

/* It is in vain to say that democracy is less vain, less proud, less
selfish, less ambitious, or less avaricious than aristocracy or
monarchyWhen clear prospects are opened before vanity, pride, avarice,
or ambition, for their easy gratification, it is hard for the most
considerate philosophers and the most conscientious moralists to resist the
temptation. Individuals have conquered themselves. Nations and large bodies
of men, never.  -from "The Letters of John and Abigail Adams" */

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

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

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

Cf. .

--
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: Ad importance of the message paradigm (Re: Secure sockets (Re: Some questions on SYSCALL

2022-07-02 Thread Rupert Reynolds
I can't remember which of Alan Kay's talks it's in, but I have a few of his
saved and one or two have him saying "the big idea is messaging" and
something like "whatever I had in mind, I can tell you now it wasn't C++"
:-)

The late great Joe Armstrong (of Erlang fame) also quoted Alan Kay on this
at least once.

In my opinion, a lot of language development jumped on the OO bandwagon
without thinking things through properly.

Roops

On Sat, 2 Jul 2022, 21:06 Bob Bridges,  wrote:

> Rony, could you (or someone) say more about that?  The ooRexx
> documentation has a lot to say about messaging, which is a bit confusing to
> me because I first got a handle on OOP in VBA and VBSCript, which do not.
> If the big idea is messaging, does VBA do that and I just didn't notice?
> Or are the VB flavors something different that don't do messaging, or not
> very much?
>
> ---
> Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313
>
> /* It is in vain to say that democracy is less vain, less proud, less
> selfish, less ambitious, or less avaricious than aristocracy or
> monarchyWhen clear prospects are opened before vanity, pride, avarice,
> or ambition, for their easy gratification, it is hard for the most
> considerate philosophers and the most conscientious moralists to resist the
> temptation. Individuals have conquered themselves. Nations and large bodies
> of men, never.  -from "The Letters of John and Abigail Adams" */
>
> -Original Message-
> From: IBM Mainframe Discussion List  On Behalf
> Of Rony G. Flatscher
> Sent: Saturday, July 2, 2022 15:05
>
> Alan Kay is regarded to have coined the term "object-oriented programming
> (OOP)" in the context of his work while at PARC. He is being cited on
> Wikipedia:
>
> I'm sorry that I long ago coined the term "objects" for this topic
> because it gets many people
> to focus on the lesser idea. The big idea is "messaging".[8]
>
> Cf. .
>
> --
> 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: Ad importance of the message paradigm (Re: Secure sockets (Re: Some questions on SYSCALL

2022-07-02 Thread Bob Bridges
Rony, could you (or someone) say more about that?  The ooRexx documentation has 
a lot to say about messaging, which is a bit confusing to me because I first 
got a handle on OOP in VBA and VBSCript, which do not.  If the big idea is 
messaging, does VBA do that and I just didn't notice?  Or are the VB flavors 
something different that don't do messaging, or not very much?

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

/* It is in vain to say that democracy is less vain, less proud, less selfish, 
less ambitious, or less avaricious than aristocracy or monarchyWhen clear 
prospects are opened before vanity, pride, avarice, or ambition, for their easy 
gratification, it is hard for the most considerate philosophers and the most 
conscientious moralists to resist the temptation. Individuals have conquered 
themselves. Nations and large bodies of men, never.  -from "The Letters of John 
and Abigail Adams" */

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

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

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

Cf. .

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


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

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


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

Cf. .

---rony


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

On 02.07.2022 02:20, David Crayford wrote:

Thanks Rony. I really enjoyed reading that paper.

+1

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


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


---rony

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





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

On 30.06.2022 00:52, David Crayford wrote:

On 30/06/2022 6:37 am, Farley, Peter x23353 wrote:

Gentle listers,

Can we all agree to let this discussion be resolved by agreeing to the Perl mongers motto, 
TMTOWTD

TWTOWTD? Or maybe not. Show me how to create a secure socket in REXX without 
using PAGENT.


You may want to check out the slides in 
 for a 
simple solution with ooRexx.


---rony

P.S.: The above slides were used to teach non-programmers from the university's administration 
who were interested to learn/see the concepts of programming. They were able to come up with 
homework excercises exploiting secure sockets on their own. 


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


Re: Secure sockets (Re: Some questions on SYSCALL

2022-07-02 Thread Rony G. Flatscher

On 02.07.2022 02:20, David Crayford wrote:

Thanks Rony. I really enjoyed reading that paper.

+1

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


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


---rony

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





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

On 30.06.2022 00:52, David Crayford wrote:

On 30/06/2022 6:37 am, Farley, Peter x23353 wrote:

Gentle listers,

Can we all agree to let this discussion be resolved by agreeing to the Perl 
mongers motto, TMTOWTD

TWTOWTD? Or maybe not. Show me how to create a secure socket in REXX without 
using PAGENT.


You may want to check out the slides in 
 for a 
simple solution with ooRexx.


---rony

P.S.: The above slides were used to teach non-programmers from the university's administration 
who were interested to learn/see the concepts of programming. They were able to come up with 
homework excercises exploiting secure sockets on their own. 


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


Re: Secure sockets (Re: Some questions on SYSCALL

2022-07-01 Thread David Crayford

Thanks Rony. I really enjoyed reading that paper.

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


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

On 30.06.2022 00:52, David Crayford wrote:

On 30/06/2022 6:37 am, Farley, Peter x23353 wrote:

Gentle listers,

Can we all agree to let this discussion be resolved by agreeing to 
the Perl mongers motto, TMTOWTD
TWTOWTD? Or maybe not. Show me how to create a secure socket in REXX 
without using PAGENT.


You may want to check out the slides in 
 
for a simple solution with ooRexx.


---rony

P.S.: The above slides were used to teach non-programmers from the 
university's administration who were interested to learn/see the 
concepts of programming. They were able to come up with homework 
excercises exploiting secure sockets on their own.


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


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


Re: Some questions on SYSCALL

2022-07-01 Thread David Crayford

On 30/06/2022 2:58 pm, David Crayford wrote:
REXX is never the right language unless you have no choice, such as 
using an API such as SDSF or an environment such as Netview.


I'm going to take that back, which is unusual for me. I just realized 
that I have recently coded lots of REXX that uses the SDSF API. I create 
JSON which is processed in a pipe by Python code using the curses 
library so I get the goodness of SDSF without having to leave the shell. 
I also wrote a Redis command processor called RedisRexx. It's a good 
example of where REXX is a good choice and pleasant to use. Redis turbo 
charges REXX. You can use it for pub/sub models where you run pools of 
address spaces to process tasks or as a distributed data structure 
server. REXX doesn't have sorted sets, binary trees etc and Redis 
provides that and is lightening fast.





On 30/06/2022 11:21 am, Charles Mills wrote:

Charles knows C++ so I don't understand why he would pick REXX
One factor is that my deployment machine does not have a C++ compiler 
and does not share DASD with my development machine. So for C++ the 
cycle is


- Edit in IDE on Windows
- Build in IDE on Windows; get to clean compile
- Upload to development machine
- Build on z/OS (hopefully no z-specific errors; if so, iterate)
- Copy load module from development to deployment (complex load 
module FTP)

- Test
- Repeat as necessary

For Rexx OTOH the cycle is
- Edit in text editor in Windows
- Upload to deployment machine (simple ASCII text upload)
- Test
- Repeat as necessary


You need a better IDE. I recommend Intellij.


A much faster development cycle.

I built, tested and deployed the new HLASM module and the Rexx code 
in about 13 hours billable (including all the discussion here). I 
doubt that I could have done that with C++. There is more to "best 
language for the job" than elegance, conciseness, "modernness" and 
efficiency of execution.


For Python there is no way of knowing, but I think I might have spent 
that much time trying to get Python downloaded and installed. IBM 
manages to make the most simple tasks difficult. For one of the two 
machines I would have had a "business" or "legal" issue that might 
have taken 13 hours; certainly would have taken weeks elapsed. And 
that is before any "learning Python" issues. I am sure it is a 
wonderful language, but I think it is wishful thinking to say "see, 
you had some API issues with Rexx; therefore you would have been 
better off with Python." I suspect I might have had some API issues 
with my first Python program. 


Also, I get great Rexx community support right here on this forum. 
Where would I go for mainframe-specific Python community support? I'm 
sure there is some relevant forum, but how active is it? OT, but I 
have gotten pretty unhappy with Stack Overflow. Too many questions 
there now seem to draw a "not a perfect question" rebuke from some 
self-important moderator.


BTW, I do think I might want to learn Python. I bought an O'Reilly 
textbook. I have a six-hour flight coming up, and I think that it 
might be just perfect for learning Python.


Charles


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] 
On Behalf Of David Crayford

Sent: Wednesday, June 29, 2022 3:27 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On 30/06/2022 5:52 am, Bernd Oppolzer wrote:

The only reason why your Python code is shorter is because you use
the builtin os.walk method to walk through the directory recursively.

Isn't that the point? Python has an enormous standard library to do
useful things. Also note the use of iterators (or generators). In most
languages I use you can turn a subroutine inside out
that returns a value using "yield". The advantages of this model should
be obvious. If you wanted to grab the first 10 items from a list of
100,000 you don't need to build the entire list as you would with REXX.

Going back to Charles original requirement and why I piped up. Charles
knows C++ so I don't understand why he would pick REXX for a z/OS UNIX

--
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: Some questions on SYSCALL

2022-06-30 Thread Michael Phillips
wow... I'm so glad I retired a few years ago. and that I spent more time with 
VM/CMS, AIX and Unix (with Perl) than fooling with Rexx!

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


Re: Some questions on SYSCALL

2022-06-30 Thread David Crayford

On 30/06/2022 11:21 am, Charles Mills wrote:

Charles knows C++ so I don't understand why he would pick REXX

One factor is that my deployment machine does not have a C++ compiler and does 
not share DASD with my development machine. So for C++ the cycle is


Sound compelling, doesn't it? Unfortunately, you may trip up as soon as 
you require functionality that other languages provide that REXX is 
impoverished. How do I?


1. Sort an array
2. Use a data structure such as a binary tree, linked list etc
3. Access world class open source code
4. Process a VSAM data set
5. Write an external package with state
6. Functions as first class values?

I could go on and on. I'm in violent agreement with Rony. If you are 
must code REXX then use NetRexx which liberates you from mediocrity. 
Whenever somebody makes the argument to use REXX citing productivity I 
object because it's BS.






- Edit in IDE on Windows
- Build in IDE on Windows; get to clean compile
- Upload to development machine
- Build on z/OS (hopefully no z-specific errors; if so, iterate)
- Copy load module from development to deployment (complex load module FTP)
- Test
- Repeat as necessary

For Rexx OTOH the cycle is
- Edit in text editor in Windows
- Upload to deployment machine (simple ASCII text upload)
- Test
- Repeat as necessary

A much faster development cycle.

I built, tested and deployed the new HLASM module and the Rexx code in about 13 hours billable 
(including all the discussion here). I doubt that I could have done that with C++. There is more to 
"best language for the job" than elegance, conciseness, "modernness" and 
efficiency of execution.

For Python there is no way of knowing, but I think I might have spent that much time trying to get Python downloaded and 
installed. IBM manages to make the most simple tasks difficult. For one of the two machines I would have had a 
"business" or "legal" issue that might have taken 13 hours; certainly would have taken weeks elapsed. And 
that is before any "learning Python" issues. I am sure it is a wonderful language, but I think it is wishful 
thinking to say "see, you had some API issues with Rexx; therefore you would have been better off with Python." I 
suspect I might have had some API issues with my first Python program. 

Also, I get great Rexx community support right here on this forum. Where would I go for 
mainframe-specific Python community support? I'm sure there is some relevant forum, but 
how active is it? OT, but I have gotten pretty unhappy with Stack Overflow. Too many 
questions there now seem to draw a "not a perfect question" rebuke from some 
self-important moderator.

BTW, I do think I might want to learn Python. I bought an O'Reilly textbook. I 
have a six-hour flight coming up, and I think that it might be just perfect for 
learning Python.

Charles


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of David Crayford
Sent: Wednesday, June 29, 2022 3:27 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On 30/06/2022 5:52 am, Bernd Oppolzer wrote:

The only reason why your Python code is shorter is because you use
the builtin os.walk method to walk through the directory recursively.

Isn't that the point? Python has an enormous standard library to do
useful things. Also note the use of iterators (or generators). In most
languages I use you can turn a subroutine inside out
that returns a value using "yield". The advantages of this model should
be obvious. If you wanted to grab the first 10 items from a list of
100,000 you don't need to build the entire list as you would with REXX.

Going back to Charles original requirement and why I piped up. Charles
knows C++ so I don't understand why he would pick REXX for a z/OS UNIX

--
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: Listing of files (Re: Some questions on SYSCALL

2022-06-30 Thread William Schoen
Be careful with recursion down directory trees.  
If you get deep enough rexx terminates with a blown stack.
With enough thought, recursion could always be done with loops.
Check out /samples/copytree.  It has code to recurse through arbitrary depth 
trees.

Bill Schoen

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Rony G. Flatscher
Sent: Thursday, June 30, 2022 5:47 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: [EXTERNAL] Listing of files (Re: Some questions on SYSCALL

On 29.06.2022 23:24, David Crayford wrote:
> On 30/06/2022 4:22 am, Bernd Oppolzer wrote:
>>>
>> This is an old OS/2 REXX program (from the 1990s, IIRC), used to 
>> traverse a directory tree recursively and issue a command in every 
>> subdirectory found:
>>
>>
>> /* rexx */
>>
>> arg command
>>
>> call RxFuncAdd "SysLoadFuncs", "REXXUTIL", "SysLoadFuncs"
>> call SysLoadFuncs
>>
>> dir = directory()
>> if right(dir,1) = "\" then
>>    dir = left(dir, length(dir) - 1)
>>
>> call tree dir, command
>>
>> x = directory(dir)
>>
>> exit
>>
>>
>> tree: procedure
>>
>>    arg dir, command
>>
>>    say "*** Verzeichnis in Bearbeitung: "dir" ***"
>>
>>    x = directory(dir)
>>
>>    command
>>
>>    rc = SysFileTree("*.*", verz, "D")
>>    do i = 1 to verz.0
>>   dir = word(verz.i, 5)
>>   call tree dir, command
>>    end
>>
>>    return
>>
>>
>> you may notice the recursive call of the procedure "tree".
>>
>> I don't see any justification for your REXX bashing; it's just 
>> another flavor of scripting language, which allows to do great 
>> things, once you manage to use it.
>
> Sorry Brend, but I don't consider that snippet to be great! It's a 
> perfect example of flabby, verbose REXX code. The only justification 
> for using REXX is that you personally favor the language. Python is far more 
> succinct.
>
> |for| |root, dirs, files ||in| |os.walk(path_of_the_directory):|
> |||for| |i ||in| |files:|
> |||print||(os.path.join(root, i))|

Just having to use those vertical bars to explicate how the Python code has to 
be formatted
(indented) in order for it to work correctly is quite distorting.

Also the Python os module is quite extensive and hard to gain and keep an 
overview of the functionality it offers. [1]

---

Here a version of sysFileTree (also available in Regina's regutil package if 
not mistaken) that lists all files in all subdirectories:

call sysFileTree "*.rex", "files.", "FSO"
do i=1 to files.0
    say files.i
end

Simple. REXX.

Here a version using ADDRESS...WITH and the operating system's dir command.

cmd = "dir *.rex /b /s"
ADDRESS SYSTEM cmd WITH OUTPUT STEM files.
do i=1 to files.0
    say files.i
end

Simple. REXX.

---rony

[1] "os — Miscellaneous operating system interfaces": 
<https://docs.python.org/3/library/os.html >

--
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: Some questions on SYSCALL

2022-06-30 Thread Seymour J Metz
PKB. 


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


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
David Crayford [dcrayf...@gmail.com]
Sent: Wednesday, June 29, 2022 11:14 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On 29/06/2022 10:48 pm, Seymour J Metz wrote:
> Have you stopped beating your wife? There is no agreement of what is a better 
> language, much less a description of the context in which to evaluate 
> "better".
You really are a huge twat. Why don't you just bugger off. You won't be
missed.
>
> 
> From: IBM Mainframe Discussion List  on behalf of 
> David Crayford 
> Sent: Wednesday, June 29, 2022 8:06 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Some questions on SYSCALL
>
> On 29/06/2022 6:37 pm, Seymour J Metz wrote:
>> Sme, but manageable. The article Safe REXX at 
>> <http://secure-web.cisco.com/18tXxLjz2q-nDjE3Fk3aQsvRJpFcP22D9GKeoWSbitPmfcGAttYHjb-kP18U8Ikl-aTGx-pwraxaebV32MLF29JU1T5PHRSawvmtcOGrlNGx7qinsWE4REjw9lBM0v-qPHaExEKTjFI5whqyzgNqyyP8lJXknHgVjB9cG81on4LMjV-ujVAqpW3I-PSQoBgSx1-68Dt9t0tiiiZC2mDbYmhMIfA34222KIpNnr3jIWqO2GmhJvocQ6YsZ4LFzMypLVDsEzR1jq2yHlrf-j3yNYMBOBBgbawlGvlwTlhcDmyj5VUWQPczUZkWLHAwKtz8DidQWTRQb3gMsJzKiE-WSx1GWdm6Q0IiDjs2_Omg4xTOuCBtUymaNKzQUCYdHr65JzHggOCeIsQlhDwHMCl30Fku0q_ApFl2GTV8nFoXiCad0H0PKU9S6UZqHhGLy0ZqE/http%3A%2F%2Fwww.rexxla.org%2FNewsletter%2F9812safe.html>
>>  and 
>> <http://secure-web.cisco.com/1YOkF0HmSXzgkUjFJmn8yFhg2L09HrpgS0qAPaRvAUGL9PH3DMRW9K45clWzrW3ewTanQwrdKON0NcKzVyqjLzs0d5niuN5Wj3Wz8MHU971Gj4znrgmAATcjrWFQuA1kJt6A09GQttX8NMkRBn485myf2jYTkMEdH4Wi8xuhHqRIh3-zivudzlZAe3urnn9HJS_dAirVPwjrWMdNZKY23K2d0i77HzCdFFa2Bomro21ICQV5LodBCmW7FVOYvTEK9Mt6MKlkVZxG9bwOvl_233vbJ1fMWIxmy9wqXSdyBfeiAbPJI3BDNK-pVkTQXi1u435aytEI2WvKF5emDChP3q5DKBhScFJ5oDZeN8lMrLcbd4hAcHY!
>   
> nrtSS_rhn5jeu2S3924pgQlUz_wRvRDI4Yo6x5c15qLVoxg18D_XjKAA_W9IwcaxWHhc_lIcXL81Pt/http%3A%2F%2Fhttp://secure-web.cisco.com/1qQ0MuJfNqrkRhOtGFcMKOtFazYWx7fAJOIelCox5gpxgljjeHgBBFDhi_2awOvz96l5d7fMChhY4Zux3tenTbZI1tdIvk-5pq-W2I2zK3mR6mHoKI2bKjTiCRoIqZX-br_RBMadMLiElQGzvv3VdhyAjhI15GaifXa2YIipEoJshptu8AYmkrL8QWaLXjmLhc8JocTQXzymDOU7Qa9dnn3WkXNPhtWIpHMAcrUsOWSHEArqXgzTOdyz1UcPfrPssf4hgvoH-vXWKAWt6Qh5yyVbt_tVb0sOOSaW1Q7iwpBAOkKtIOgb3ZIjg8kwQFsdBFyvytkQrLUB7HzsjqstgX0v66mrac3XmeZt-x57MV6YDhIhNxe_Og1iwJ_4d4h4VZKZFbKXMh7yMpICudXzRZJAwIKoud_Eupv_kHiUoyULozJa7RboKVs0ZjW5ZVkQp/http%3A%2F%2Fwww.rexxla.org%2FNewsletter%2F9901safe.html;>
>  has some tips on avoiding REXX pitfalls.
>
> What's the point in managing something when you can just use a better
> language? It's a good time to be working on z/OS as we have an abundance
> of choice. That's not entirely obvious on this forum where every problem
> seems to be met with a ham-fisted REXX solution.
>
> Yes, Crayford's bashing REXX again. I have some experience of using z/OS
> UNIX REXX services but I didn't find it productive. Maybe somebody with
> more knowledge than me could post a snippet that demonstrates how to
> recursively traverse a directory tree printing the entries.
>
>
>
>> --
>> Shmuel (Seymour J.) Metz
>> http://mason.gmu.edu/~smetz3
>>
>> 
>> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
>> David Crayford [dcrayf...@gmail.com]
>> Sent: Tuesday, June 28, 2022 11:31 PM
>> To: IBM-MAIN@LISTSERV.UA.EDU
>> Subject: Re: Some questions on SYSCALL
>>
>> On 29/06/2022 5:42 am, Charles Mills wrote:
>>> "write" fd "buf"
>>>
>>> Which makes no sense to me at all. fd is passed by value but "buf" by name?
>> It's horribly inconsistent and unpleasant to use. The buffer HAS to be a
>> passed by reference (variable) as it could break REXX string length
>> limits or contain characters that REXX chokes on.
>> I can't help but think that you've made a rod for your back. REXX is
>> superficially simple but in my experience, which is 30 years of using
>> the language, it is anything but and has endless pitfalls.
>>
>> --
>> 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

Re: Some questions on SYSCALL

2022-06-30 Thread Seymour J Metz
That behavior is expected, and useful, in any Rexx implementation.  What was 
unexpected was that SYSCALLS("ON") was the entire statement, rather than a 
snippet.


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


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Charles Mills [charl...@mcn.org]
Sent: Tuesday, June 28, 2022 4:41 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

> It issued the value returned by the SYSCALLS (probably '0') to the default 
> command
> environment (perhaps 'MVS') which failed the command: "-3".

Well, yeah. Not my first Rexx program. The question is "is this to be expected 
in a "legacy" batch environment?"

Charles


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Paul Gilmartin
Sent: Tuesday, June 28, 2022 1:22 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On Tue, 28 Jun 2022 12:44:51 -0700, Charles Mills wrote:

>I was not super clear, was I? Per 
>https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ibm.com%2Fdocs%2Fen%2Fzos%2F2.1.0%3Ftopic%3Denvironment-establishing-syscalldata=05%7C01%7Csmetz3%40gmu.edu%7C1fb4388d7cdd4bf1d74408da5946a81d%7C9e857255df574c47a0c00546460380cb%7C0%7C0%7C637920457259624729%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=N6qp0kHfpo6wn4rxzXdHcxoymS2skmsXVHD2HWcfMfQ%3Dreserved=0
> I coded
>
>SYSCALLS("ON")
>
>And got a -3. Subsequent SYSCALL "whatever" commands failed.
>
It issued the value returned by the SYSCALLS (probably '0') to the default 
command
environment (perhaps 'MVS') which failed the command: "-3".

>ADDRESS SYSCALL "whatever" works; SYSCALL("ON") did not.

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

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


Re: Some questions on SYSCALL

2022-06-30 Thread Seymour J Metz
Note that ADDRESS WITH is new with ooRexx 5.0, which last I saw was still in 
beta. It's been in Regina for a long time.

OTOH, facilities such as DO OVER has been in OREXX and ooRexx for decades, and 
are quite useful. And, yes, similar facilities are available in other 
languages, e.g., Python, Ruby.

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


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Rony G. Flatscher [rony.flatsc...@wu.ac.at]
Sent: Wednesday, June 29, 2022 9:41 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

...

Only then would one become able to take advantage of the many new ooRexx 
features like becoming able
to fetch e.g. stems by reference,  or using ANSI REXX' "address...with" (e.g. 
redirecting input from
stems or standard and error output to stems), being able to create public Rexx 
routines (can be
directly called from another REXX program) and much more.

...

---rony

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


Re: Some questions on SYSCALL

2022-06-30 Thread Peter Sylvester

Hi,


On 30/06/2022 06:28, Paul Gilmartin wrote:

On Wed, 29 Jun 2022 20:22:10 -0700, Charles Mills wrote:


...
"99 Bottles of Beer" is more concise in C++ than in Python, and MUCH more 
concise in BASIC. Does that make BASIC a better language? 
https://en.wikipedia.org/wiki/99_Bottles_of_Beer


The BASIC is 219 characters.  I converted it slavishly to Rexx.  32 characters 
shorter -- 187:

do Bottle = 100 TO 1 by -1
  say Bottle "bottles of beer on the wall," Bottle "bottles of beer"
  say "Take one down and pass it around," Bottle-1 "bottles of beer on the wall"
end Bottle
i
Does that make Rexx a worse language?

(We don't need no steenkin' "||"!)

The wikipedia article doesn't seem to be a comparison of how the *same* algorithm implemented in 
various languages.


Case 1 and 0 are treated as special cases for obvious reasons. And the loop 
ranges are also different.
Treating the last case(s) inside the loop or at the end? What is better? ... It 
depends ...
And the different names for the counter variable. :-)

e.g.: a python similar to the basic could be:

   for quant in range(99,1,-1):
       print(f"{quant} bottles of beer on the wall. {quant} bottles of beer.")
       print(f"Take one down and pass it around{quant-1} bottles of beer on the 
wall.")

One more line (or 2) to get the C++ equiv.

The database of these programs also contains quite funny examples which 
extremely obfuscated stuff. :-)

Best
Peter








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


Re: Some questions on SYSCALL

2022-06-30 Thread Seymour J Metz
I believe that the current ooRexx is faster but that it is 64-bit only, and 
still slower than Regina when running classic Rexx code.

There is no requirement that I know of to write a DSL for foo in foo.

With regard to Lua, it's the implementation language for wiki extensions.


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


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
David Crayford [dcrayf...@gmail.com]
Sent: Wednesday, June 29, 2022 9:54 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

Hi Rony,

I know ooRexx. I ported it to z/OS 10 years ago but it was buggy and
slow. There is zero chance of IBM or a vendor wasting resources on REXX
today as there is no market for it. Now we have Python on z/OS REXX is
very much a legacy language. That's even more pertinent with the shift
from TSO/ISPF to IDEs.

I could be wrong and I'm willing to be turned. I'm a big fan of Lua
which I consider to be the most elegant language I know. It can easily
be used to write DSLs for configuration or model development. How do I
write a DSL in REXX?

https://secure-web.cisco.com/1zwwka9ikrz2Xisd3pYWYkYh_Q_tbNFsPDN57uWZIaSXWPlM6h9BLe1xSGcZ-T0vIdVvC05cVcgIMjecqoCzQSgGAlsLvvuolInHOKoS8XB96f9mY-avq4OztVSHNRJe9TtVHK54Pyo9BoPbw5u-CKRa4_-MebNKDA_sAnWBSkAT8bjLwIokBwrneh-u1sVGFB8QLYd_-r1X20zlWDSXaPM2USYGoIcnkZkp87hZJHcS58JqRxXl0lEZngrsMgqpgUpnguUHHalz2D2FjmZBOQcfcEZOGXlyWrMAgTo-iH1L2pBp8fe_jQYgrON9EGs24XIJehzw3Lh2FCCiWj4KoiCi4UlXaScRlCX83RpvvelePIAoq-4XuAlFN1sz7bUe-f9da7zAq31veX-K-BCdWodXoeD0oiil5KLWde95Yc3NInTPBpihQB1l7RuiM_TNI/https%3A%2F%2Fleafo.net%2Fguides%2Fdsl-in-lua.html

On 29/06/2022 9:41 pm, Rony G. Flatscher wrote:
> Hi David,
>
> On 29.06.2022 14:06, David Crayford wrote:
>> On 29/06/2022 6:37 pm, Seymour J Metz wrote:
>>> Sme, but manageable. The article Safe REXX at
>>> <http://secure-web.cisco.com/1U-cEbyGSEGcoIb7CbHdBCM7EqV1QrPFBg1ql-ejAJo0ivTEKEn8o85zSW8sQ5JGruF6UW6TMsPtdyuC-fN_FhyffbQp90Raob5-4Xkb_pB91vBGSfx9RzmimizQpRy5lnzRqmB_-IyqUpcR0uL6c9W4_-e_mq3Y3PQBRCER9UIV4QQKEdzx1KGdfikLHChy_5Jak_CBZLVbuPZRnpp-jdfkKv1QNOGEMOyt9YO7umNBJiRtkU8IgxubA3TYqciAKx0Qqyoh6fuKqsbA9YVTbHNmma1KEoeQ81WTlnE3YEJE_nz6yzBpasGLWP7AQWfd1Ad9097622M5yAkxgb8hqP309HWuM-P23nP0VUNgzpgMnoU34t9fedfPG8bL6sq2fD9Ja_d-6nAyvcsiE6nKFBiU8j8GtleJ0YTIctJcqoowOy4HHVmphaRHZm5U2lOQ7/http%3A%2F%2Fwww.rexxla.org%2FNewsletter%2F9812safe.html>
>>>  and
>>> <http://secure-web.cisco.com/1mPsmK9Rc_gBcwojK1nVonHiQmIogmEbnUr3iId3AUjbZ0URJZsO9yTzIin3vVyRcdzJxrm4p3Rhz82BKOOBBlXa1BAkg-5GSDH-pcvZjKORkWByiXMwaB9j-LAvDXdYhz88XeUPsdr4yHUU_Ky3VxaOLn2U9xhu5Ly8y_2AW25BGERnuq55yeDAl_KirFm4j1W1Nak4G3X-zN4Fa4ALZuTphhC91ilXQsUYLFxK1VkJNlw59OCB9Bv4f4vnh_YcFmKCVinFvKSAppFMYHCBmyKdLkiLV21X3TDrbQTprWhI2iHzZtsfiz7oFjGVr1aga-LZeI1QpiYlwAa5ZCTBSDYC0mEwCu7lReHAEIZpKI05xtypTUsYOrctsjDvEplnQfmfkdsSfTfLcaheUsXAc1wMi8HnbW5T8p3SelNLQUScPmNDPSeVbwQaBIL8kfJ5F/http%3A%2F%2Fwww.rexxla.org%2FNewsletter%2F9901safe.html;>
>>>  has some tips on
>>> avoiding REXX pitfalls.
>>
>> What's the point in managing something when you can just use a better
>> language? It's a good time to be working on z/OS as we have an
>> abundance of choice. That's not entirely obvious on this forum where
>> every problem seems to be met with a ham-fisted REXX solution.
>>
>> Yes, Crayford's bashing REXX again. I have some experience of using
>> z/OS UNIX REXX services but I didn't find it productive. Maybe
>> somebody with more knowledge than me could post a snippet that
>> demonstrates how to recursively traverse a directory tree printing
>> the entries.
>>
> The problem is that this is not constructive. Not sure why it is so
> important for you to bash REXX even if it makes you look bad at times.
>
> REXX in the mainframe world (I learned REXX for the first time on a
> VM/CMS 370 system a few decades ago) is of course a great - and
> unmatched - productivity tool and as a result over the decades there
> has been an incredible amount of useful REXX inventory created.  Best,
> REXX is easy to learn and easy to use like no other language of that
> power.
>
> If you were to know ooRexx you would realize that porting it to the
> mainframe would even help yourself and everyone else to settle on a
> few important languages and not being forced to go astray with this
> language for solving this particular problem, that language for
> solving that particular problem, and then suggesting to use yet
> another language for ...
>
> Porting ooRexx to the mainframe would allow for keeping the existing
> REXX programs running with ooRexx (the design of ooRexx - by demand of
> IBM's customers - is such that it is compatible with classic REXX).
> Therefore one can use ooRexx to run existing REXX programs and one
> could 

Re: Some questions on SYSCALL

2022-06-30 Thread Seymour J Metz
Whoops! I missed that SYSCALLS("ON")  was the entire statement. When a 
statement contains only an expression, then the value of that expression must 
be a valid command in the current environment.

Put the SYSCALLS in an assignment statement, put it in an IAF statement or use 
CALL rather than a function invocation.

This seems like a poster child for posting the code rather than a snippet. :-(


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


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Charles Mills [charl...@mcn.org]
Sent: Tuesday, June 28, 2022 4:47 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

Yeah, very sorry, doing too many thing at once.

SYSCALLS("ON") fails with a -3. I don't know that there is much relevant 
context. It is about the third line of executable Rexx. Yes, with an "S".

So therefore subsequent SYSCALL "whatever" fails. (No "S".)

The key question: Is this to be expected in a "legacy" batch environment? If 
not, what should I look for?

ADDRESS SYSCALL "some syscall command" works. That's what I am using, 
successfully.

Charles


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Steve Smith
Sent: Tuesday, June 28, 2022 1:04 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

One-line snippets, typically with typing errors, aren't going to be enough
for someone to diagnose your problem.

For a SWAG, are you clear that the function name is syscalls (with an 's'),
and command environment name is SYSCALL (no 's')?

sas


On Tue, Jun 28, 2022 at 3:45 PM Charles Mills  wrote:

> I was not super clear, was I? Per
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ibm.com%2Fdocs%2Fen%2Fzos%2F2.1.0%3Ftopic%3Denvironment-establishing-syscalldata=05%7C01%7Csmetz3%40gmu.edu%7C9b1d7dbde2524c0ad72708da594784aa%7C9e857255df574c47a0c00546460380cb%7C0%7C0%7C637920460977337888%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=7hWf%2Fwk4yjQk%2BbFJwCPrgUaeCIIxm4pZFMVeAjrmqIE%3Dreserved=0
> I coded
>
> SYSCALLS("ON")
>
> And got a -3. Subsequent SYSCALL "whatever" commands failed.
>
> ADDRESS SYSCALL "whatever" works; SYSCALL("ON") did not.
>
> Charles
>
>
>

--
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: Some questions on SYSCALL

2022-06-30 Thread Seymour J Metz
No, this is just people using an old and established indentation style that you 
don't happen to like; the style is decades older than Python.

Of course, half a century ago people were already arguing fervently about the 
one revealed indentation style.


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


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
David Crayford [dcrayf...@gmail.com]
Sent: Wednesday, June 29, 2022 8:32 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On 29/06/2022 8:27 pm, Lionel B. Dyck wrote:
> The formatting was a quick and dirty - I typically use the REXXFORM edit 
> macro to clean up alignments and keep things neat.

I'm not knocking your code Lionel. It's more the case that I don't like
what has become common formatting of REXX code blocks where the end is
indented at the end of the block. Is this REXX pretending to be Python
by obscuring the "end"?

if/do/ ...
...
   end



>
> You can find it at 
> https://secure-web.cisco.com/1g9tJ9-H12eczDi12_PT5ZboacQzwFJfBkV-6quaZ3XJ89TxMjglkr3pHnnDgjgPVoHsiW6eeNjfNJRmpXuTDCz32JZ84x94UymTmVolnLtUjhrM0If48sQ1jiAaKWlrYBL72h3qSAX4Eh57jBaqSodmt55xYoxrUiBl4BLQOot4N5TKEJ693J3Y4arn2kp2bu7CgPrQlNPgLLx6AFccUGyjND8CMAF4rDpYv0O0BKsUhuQg13sKwBeZGUcY4mMzDDtkiLLuUY9OeqpyN3QdSLfGX3bN7h3pTgC8aiDX0UV2zDVWE3Q7YIMQcc7LKwwDK6jvKccZyOuABGKC1SY-GPlUCUgyXicMXkk4NUv_xkWVYZqiP2gLRGuEtkfP5Wucz91FAWIdrpE4T72FN1iVRhed3U0iR3V_r3F-zAQbEuRmvgm2ThFkgSzPdFpNw5N-k/https%3A%2F%2Fgithub.com%2Flbdyck%2Frexxform
>  - I ported it from z/VM to work as an edit macro.
>
> Yes - you could use SYSCALLS and get the same info but this was a quick and 
> easy answer
>
> Enjoy
>
> Lionel B. Dyck <><
> Website: 
> https://secure-web.cisco.com/1aNt8pJ83MNEQ1NtSHr3Y72x8EWzbmI9xzFcAVBDj44gJ7ox2xy14AOdyASS_1M2DoQl_kTtewjoWtBEXko8oaqvU-9yoJAxfLCc-4hAE7gjap4NmDMB8OOGnNhnFKDA2ClgkUIl2CRpMtTLuJ5QKNhbfV6b1SVKQ4hf_zvRAbTZGAfEWlIX5pyJgchTrOsHNcztlOMWCC4yg-ZG__627w2yiPnXs8gCKenifgsmJ253MqfoTH6McyE1_G8Z72hRQKNnjs3wTdWRxGAz6g5yZ86vL7lP1UhfRnz5ZiraTxtR1HzvAQq-fy60AdPR33V0A21E9LSohJi83YHrhutHWUEJQc15gjEDAI3rbZgwikZC_3g5wfT2spqrr_Ho4KonYuPYY-Ad1RIabboN7dM9v1efoKbM2CUCy6WJlY7ZHEhUbhKEB0tSWWDXtx3r7Pqxr/https%3A%2F%2Fwww.lbdsoftware.com
> Github: 
> https://secure-web.cisco.com/1OixksXKLve8NJ19OczrvaLipWI-lIbn-FtN_salcVl5PGkdMnuluYZ828-2Zh-EBm2ESF_D7NVNyJohR094PGZ-rmYLeOqehTJ1ZJcmAsN4AMTsYW6JAGpYKG92XhCk-FOf9Yf1_UCIohGgGnuG246i6ISZ1VvNSpN2va4p_EQjY2x51MRS9RcymuQcYkNqWIWxbUk9NvzdMFLdgJdQXyKf6I1bxgNygfrvxKuFt6OuwZ2pIgTE1sc_Np2jSa6LFtoj6GV0AvQX02Z9J3R9e35OWgZDkcQPwGyTqcl7w2d5YEIsNOxrT93N1APsv5NOq3vA2CmAmVcmHQePBuMe6aIvS9JrXkqamJyQ_xZmb7p_EdMlsgp85Wxx1bwkerm_zDBwXiOacATKPM00BvkeGP1tBZ8glkiHlp6-BZl67g33O0aWIY8TnzwV6hudx09nf/https%3A%2F%2Fgithub.com%2Flbdyck
>
> “Worry more about your character than your reputation. Character is what you 
> are, reputation merely what others think you are.”   - - - John Wooden
>
> -Original Message-
> From: IBM Mainframe Discussion List  On Behalf Of 
> David Crayford
> Sent: Wednesday, June 29, 2022 07:19 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Some questions on SYSCALL
>
> Thanks Lionel. If I want to get the directory entry I suppose I have to also 
> execute bpxwunix("ls ") or use SYSCALLS?
>
> BTW, I really wish the "end" scope terminater would match the "do"
> column alignment. It's just another reason for me to hate on REXX when it's 
> become common practice to uses bizarre formatting rules.
>
> On 29/06/2022 8:12 pm, Lionel B. Dyck wrote:
>> Perhaps something like this will give you what you want to recursively 
>> traverse a directory:
>>
>> x = bpxwunix('find /u/user/work/',,out.,err.) do I = 1 to out.0
>>  say out.i
>>  end
>>
>>
>> Lionel B. Dyck <><
>> Website: 
>> https://secure-web.cisco.com/1aNt8pJ83MNEQ1NtSHr3Y72x8EWzbmI9xzFcAVBDj44gJ7ox2xy14AOdyASS_1M2DoQl_kTtewjoWtBEXko8oaqvU-9yoJAxfLCc-4hAE7gjap4NmDMB8OOGnNhnFKDA2ClgkUIl2CRpMtTLuJ5QKNhbfV6b1SVKQ4hf_zvRAbTZGAfEWlIX5pyJgchTrOsHNcztlOMWCC4yg-ZG__627w2yiPnXs8gCKenifgsmJ253MqfoTH6McyE1_G8Z72hRQKNnjs3wTdWRxGAz6g5yZ86vL7lP1UhfRnz5ZiraTxtR1HzvAQq-fy60AdPR33V0A21E9LSohJi83YHrhutHWUEJQc15gjEDAI3rbZgwikZC_3g5wfT2spqrr_Ho4KonYuPYY-Ad1RIabboN7dM9v1efoKbM2CUCy6WJlY7ZHEhUbhKEB0tSWWDXtx3r7Pqxr/https%3A%2F%2Fwww.lbdsoftware.com
>> Github: 
>> https://secure-web.cisco.com/1OixksXKLve8NJ19OczrvaLipWI-lIbn-FtN_salcVl5PGkdMnuluYZ828-2Zh-EBm2ESF_D7NVNyJohR094PGZ-rmYLeOqehTJ1ZJcmAsN4AMTsYW6JAGpYKG92XhCk-FOf9Yf1_UCIohGgGnuG246i6ISZ1VvNSpN2va4p_EQjY2x51MRS9RcymuQcYkNqWIWxbUk9NvzdMFLdgJdQXyKf6I1bxgNygfrvxKuFt6OuwZ2pIgTE1sc_Np2jSa6LFtoj6GV0AvQX02Z9J3R9e35OWgZDkcQPwGyTqcl7w2d5YEIsNOxrT93N1APsv5NOq3vA2CmAmVcmHQePBuMe6aIvS9JrXkqamJyQ_xZmb7p_EdMlsgp85Wxx1bwkerm_zDBwXi

Re: Some questions on SYSCALL

2022-06-30 Thread Seymour J Metz
No! You need a space after SYSCALLS and don't need the parentheses:

call syscalls 'on'
if result > 3...

foo = syscalls('on')
if foo > 3 ...

if syscalls('on') > 3 ...


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


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Steve Smith [sasd...@gmail.com]
Sent: Tuesday, June 28, 2022 4:52 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

Either that or "call syscalls('on')".

REXX is weird.

sas

On Tue, Jun 28, 2022 at 4:50 PM Charles Mills  wrote:

> So are you saying I should be coding
>
> Foo = SYSCALLS("ON")
>
> Charles
>
>

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


Scopes, environments (Re: Some questions on SYSCALL

2022-06-30 Thread Rony G. Flatscher

On 30.06.2022 01:28, David Crayford wrote:

On 30/06/2022 5:33 am, Paul Gilmartin wrote:

On Wed, 29 Jun 2022 22:22:39 +0200, Bernd Oppolzer wrote:

This is an old OS/2 REXX program (from the 1990s, IIRC),
used to traverse a directory tree recursively and issue a command in
every subdirectory found:

... with local variables protected by "procedure".


Protected? That's a good one! Another reason to hate on REXX is the lack of lexical scoping. It's 
ok for small programs but as soon as you start to scale
it's a nightmare when you"i" loop counter gets clobbered in a subroutine. "procedure" helps but 
then you have to use "expose" which normally results in

using a compound global variable such as g._namespace. REXX is a language that 
you program into.


In classic REXX there is no means to fetch stems by reference, therefore the need to be able to 
EXPOSE stems in internal routines which create a local scope using the PROCEDURE keyword.


ooRexx alleviates this need as it allows for fetching stems in internal routines/procedures using 
e.g. "USE ARG mystem." instead of "PARSE ARG" which only works on string values and therefore cannot 
fetch a stem by reference.


Having ooRexx available you immediately gain additional scopes and great new abilities. One being 
that one can define routines having their own scope (and the ability to make them directly available 
to other Rexx programs just by adding the PUBLIC option to the routine directive's name).


Another cool feature that can help simplify certain kinds of problems is the notion of "runtime 
environments" in ooRexx:


 * ooRexx package environment: in ooRexx a "package" is a file that contains 
Rexx code with
   routines that may or may not be public, classes (types, structures) that may 
or may not be
   public, method routines that may or may not be assigned to classes and much 
more. In addition a
   programmer can use the package local environment to store values that can be 
retrieved from
   anywhere within that package.

 * ooRexx local environment: ooRexx' implementation can be characterized to be 
incredibly powerful.
   Among other things one can create arbitrary many *different* ooRexx 
interpreters within the same
   process if need be. Each such ooRexx interpreter instance has its own copy 
of the ooRexx local
   environment which provides the instance's stdin, stdout, stderr, 
traceoutput, debuginput, stdque
   streams/monitors. This way each ooRexx interpreter instance will have 
separated such
   streams/monitors.

 * ooRexx global environment: this environment contains all entries that are 
meant to be globally
   available to each Rexx program in each ooRexx interpreter instance like the 
ooRexx supplied classes.

All these environment are ooRexx directories and used by the ooRexx interpreter at runtime to locate 
entries for environment symbols. An "environment symbol" is a Rexx symbol that starts with a dot 
like ".directory". The ooRexx interpreter will remove the dot and lookup the above environment 
directories in the given order to locate an entry "DIRECTORY" and will return it, once found. (If no 
entry could be found in these environments then the lookup will result in the environment symbol 
itself, i.e. the uppercased string value of the environment symbol, e.g. '.no.entry' would yield 
'.NO.ENTRY').


The dynamic nature of REXX has been carried over to ooRexx and enhanced considerably. However one 
would just exploit that power if need be.


---rony


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


Re: Some questions on SYSCALL

2022-06-30 Thread Seymour J Metz
z/OS 2.5 Using REXX and z/OS UNIX System Services, SA23-2283-50, p. 20, 
Specifying strings, at 
<https://www-40.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R5sa232283/$file/bpxb600_v2r5.pdf#page=44>
 lists the options: unquoted value, quoted with ' or ", name in parentheses. 
"address SYSCALL open (myFileName)" and "address SYSCALL open" myFileName are 
valid;  
"SYSCALL open myFileName", "SYSCALL open" myFileNam" and  "address SYSCALL open 
myFileName"  are not.

For write you pass the file descriptor by value and the buffer by name.


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


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Charles Mills [charl...@mcn.org]
Sent: Tuesday, June 28, 2022 5:42 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

I am still not quite understanding the usage of Rexx variables with SYSCALL.

If myFileName = "/u/myfile" then do I want to code

"SYSCALL open myFileName" or "SYSCALL open" myFileName  ?

In other words, does myFileName get passed by value, or does SYSCALL do an 
IRXEXCOM to find its value from its name?

Ditto for SYSCALL write. The example on 
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ibm.com%2Fdocs%2Fen%2Fzos%2F2.1.0%3Ftopic%3Dscd-writedata=05%7C01%7Csmetz3%40gmu.edu%7C165cedf311eb4386aa8b08da594f2f5f%7C9e857255df574c47a0c00546460380cb%7C0%7C0%7C63792049389869%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=Fsm5RX0E8qM%2FqazKBQWeyNCzPgmdNv0usbRLBeGAN8I%3Dreserved=0
 shows

"write" fd "buf"

Which makes no sense to me at all. fd is passed by value but "buf" by name?

Charles


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Charles Mills
Sent: Tuesday, June 28, 2022 2:01 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

Rexx *documentation* is weird.  There is no mention of that in the 
documentation.

Well, I take that back. They show it in an if statement if SYSCALLS("ON") > 3 
then ... which is more or less the same thing.

The doc could be clearer, but I guess if all the IBM doc were clear we would 
not have IBM-MAIN. Thanks.

Charles


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Paul Gilmartin
Sent: Tuesday, June 28, 2022 1:55 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On Tue, 28 Jun 2022 13:49:53 -0700, Charles Mills wrote:

>So are you saying I should be coding
>
>Foo = SYSCALLS("ON")
>
Either that or
  call SYSCALLS "ON"

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


Secure sockets (Re: Some questions on SYSCALL

2022-06-30 Thread Rony G. Flatscher

On 30.06.2022 00:52, David Crayford wrote:

On 30/06/2022 6:37 am, Farley, Peter x23353 wrote:

Gentle listers,

Can we all agree to let this discussion be resolved by agreeing to the Perl 
mongers motto, TMTOWTD

TWTOWTD? Or maybe not. Show me how to create a secure socket in REXX without 
using PAGENT.


You may want to check out the slides in 
 for a 
simple solution with ooRexx.


---rony

P.S.: The above slides were used to teach non-programmers from the university's administration who 
were interested to learn/see the concepts of programming. They were able to come up with homework 
excercises exploiting secure sockets on their own.


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


Listing of files (Re: Some questions on SYSCALL

2022-06-30 Thread Rony G. Flatscher

On 29.06.2022 23:24, David Crayford wrote:

On 30/06/2022 4:22 am, Bernd Oppolzer wrote:



This is an old OS/2 REXX program (from the 1990s, IIRC),
used to traverse a directory tree recursively and issue a command in every 
subdirectory found:


/* rexx */

arg command

call RxFuncAdd "SysLoadFuncs", "REXXUTIL", "SysLoadFuncs"
call SysLoadFuncs

dir = directory()
if right(dir,1) = "\" then
   dir = left(dir, length(dir) - 1)

call tree dir, command

x = directory(dir)

exit


tree: procedure

   arg dir, command

   say "*** Verzeichnis in Bearbeitung: "dir" ***"

   x = directory(dir)

   command

   rc = SysFileTree("*.*", verz, "D")
   do i = 1 to verz.0
  dir = word(verz.i, 5)
  call tree dir, command
   end

   return


you may notice the recursive call of the procedure "tree".

I don't see any justification for your REXX bashing;
it's just another flavor of scripting language, which allows to do great things,
once you manage to use it.


Sorry Brend, but I don't consider that snippet to be great! It's a perfect example of flabby, 
verbose REXX code. The only justification for using REXX is that you personally favor the 
language. Python is far more succinct.


|for| |root, dirs, files ||in| |os.walk(path_of_the_directory):|
|||for| |i ||in| |files:|
|||print||(os.path.join(root, i))|


Just having to use those vertical bars to explicate how the Python code has to be formatted 
(indented) in order for it to work correctly is quite distorting.


Also the Python os module is quite extensive and hard to gain and keep an overview of the 
functionality it offers. [1]


---

Here a version of sysFileTree (also available in Regina's regutil package if not mistaken) that 
lists all files in all subdirectories:


   call sysFileTree "*.rex", "files.", "FSO"
   do i=1 to files.0
   say files.i
   end

Simple. REXX.

Here a version using ADDRESS...WITH and the operating system's dir command.

   cmd = "dir *.rex /b /s"
   ADDRESS SYSTEM cmd WITH OUTPUT STEM files.
   do i=1 to files.0
   say files.i
   end

Simple. REXX.

---rony

[1] "os — Miscellaneous operating system interfaces": 


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


Re: Some questions on SYSCALL

2022-06-30 Thread Seymour J Metz
z/OS 2.5 Using REXX and z/OS UNIX System Services, SA23-2283-50, p. 21, in 
Returned from the SYSCALL environment at 
<https://www.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R5sa232283/$file/bpxb600_v2r5.pdf#page=45>,
 shows -3 as "The command environment has not been called. Probably the 
syscalls('ON') function did not end successfully, or the current address 
environment is not SYSCALL."

Functions do not return return codes, they return string values. The string 
value need not be numeric, e.g.,  left('ABC',1) has the value 'A', which is not 
numeric. In a statement containing only a function call, the returned value is  
treated as a command in the current environment.

The limit  to the number of parameters that can be passed to an address 
environment is 1. It's calls and function invocations that have a larger limit.

I would encourage you to continue participating after retirement.


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


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Bill Schoen [w...@us.ibm.com]
Sent: Wednesday, June 29, 2022 8:48 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

There are quite a few topics in this thread, some well addressed, some maybe 
not, but I'll pitch in...

re: syscalls environment should be integrated into rexx
this is included in the default environments for rexx running in mvs (irxjcl), 
tso, and ispf
calling syscalls('ON') is not required to use address syscall
all that does is define the syscall variables
The only reason I can imagine if you get errors if not using syscalls() is you 
probably have replacements for the default environments that were probably made 
a long time ago and do not include syscall.

re: syscalls('ON') and return code
used as above is a function call which does return a return code.
if you don't assign that to a variable or use it in an expression or use call, 
the rexx processor will execute the return code in the current address 
environment as a command

re: syscalls('OFF')
this causes your process to undub which is typically unnecessary and often 
results in confusion

re: write buffer is a variable name
This was done for a variety of reasons, but primarily, rexx has a limit to 
number of parameters that can be passed to an address environment.
I think TSO rexx limits it to 20.  If it took a string you would be limited to 
very few blank delimited words.
a number of syscall commands take variable/stem names to avoid issues with 
input or output rexx restrictions.
.
Probably my last post before retirement tomorrow.
Bill Schoen

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


Syntax checking plugin ... (Re: Some questions on SYSCALL

2022-06-30 Thread Rony G. Flatscher

On 29.06.2022 17:39, Bob Bridges wrote:

My first language was a subset of PL/1, and I still think it's a great 
language, but there doesn't seem to be much call for it at the clients I serve. 
 I didn't know PL/1 programmers indent the END with the paragraph; I thought it 
was just my preference, but maybe I learned it earlier than I thought.

I don't follow what you're saying about ISPF.  If I indent the END, then I can 
use eXclude and Show to reveal the start of code blocks in certain column 
numbers without the END obtruding, which (it seems to me) is just what I would 
want.  Or are you thinking that you can make sure there's an END for each one?  
I guess that would work.

Usually I test a program as I'm developing it, running it in its unfinished 
state every so often to be sure that the parts I've written so far are working 
correctly before going on to the next part.  So, for example, I read the input 
data and table it, and generate a SAY statement to be sure it's parsing the 
input correctly.  Then I delete that SAY and write the next part, with SAY 
statements to convince me it work, and so on.  But occasionally I complete a 
large amount of code, only to have REXX tell me that I'm missing and END 
somewhere.  It's usually not hard to go through the program and check each 
block of code, but yeah, a couple of times a year the problem hides from me for 
15 minutes or so.

I've written stuff in ISPPF, but never long enough for this to be a problem.  
If it needs to be that complex I write an external REXX.


One possibility would be to use the ooRexx plugin [1] for IntelliJ [2] which does syntax checking of 
classic and ooRexx programs (including the Executor derivative).


It will show you any kind of errors with a small red horizontal line at the right hand side. Just 
hover and click on such little red lines  and the plugin will try tell you what kind of error it 
found and will move you to the location of the error upon the click.


It is really a helpful tool. Copying the syntax highlighted [oo]Rexx code to the clipboard will 
allow you preserve the syntax highlighting when pasting it e.g. into a slide or a word processor 
document. Another nice feature of the plugin is automatic generation of Rexx documentation 
("ooRexxDoc"), which will create HTML-rendered documentation.


---rony

[1] IntelliJ [oo]Rexx plugin: 
: pick the latest 
version (currently 2.1.0).


[2] IntelliJ IDEA: : implemented in Java, therefore 
available for all platforms.


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


Re: Some questions on SYSCALL

2022-06-30 Thread David Crayford
You need to invest in a new IDE. You can get free stuff that support the 
mainframe over TCP here 
https://www.openmainframeproject.org/blog/2021/12/01/zowe-embraces-visual-studio-code-extensions. 



If you are prepared to spend money you have more options. This includes 
deployment to sync projedts to z/OS over FTP or SFTP.



On 30/06/2022 11:21 am, Charles Mills wrote:

Charles knows C++ so I don't understand why he would pick REXX

One factor is that my deployment machine does not have a C++ compiler and does 
not share DASD with my development machine. So for C++ the cycle is

- Edit in IDE on Windows
- Build in IDE on Windows; get to clean compile
- Upload to development machine
- Build on z/OS (hopefully no z-specific errors; if so, iterate)
- Copy load module from development to deployment (complex load module FTP)
- Test
- Repeat as necessary

For Rexx OTOH the cycle is
- Edit in text editor in Windows
- Upload to deployment machine (simple ASCII text upload)
- Test
- Repeat as necessary

A much faster development cycle.

I built, tested and deployed the new HLASM module and the Rexx code in about 13 hours billable 
(including all the discussion here). I doubt that I could have done that with C++. There is more to 
"best language for the job" than elegance, conciseness, "modernness" and 
efficiency of execution.

For Python there is no way of knowing, but I think I might have spent that much time trying to get Python downloaded and 
installed. IBM manages to make the most simple tasks difficult. For one of the two machines I would have had a 
"business" or "legal" issue that might have taken 13 hours; certainly would have taken weeks elapsed. And 
that is before any "learning Python" issues. I am sure it is a wonderful language, but I think it is wishful 
thinking to say "see, you had some API issues with Rexx; therefore you would have been better off with Python." I 
suspect I might have had some API issues with my first Python program. 

Also, I get great Rexx community support right here on this forum. Where would I go for 
mainframe-specific Python community support? I'm sure there is some relevant forum, but 
how active is it? OT, but I have gotten pretty unhappy with Stack Overflow. Too many 
questions there now seem to draw a "not a perfect question" rebuke from some 
self-important moderator.

BTW, I do think I might want to learn Python. I bought an O'Reilly textbook. I 
have a six-hour flight coming up, and I think that it might be just perfect for 
learning Python.

Charles


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of David Crayford
Sent: Wednesday, June 29, 2022 3:27 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On 30/06/2022 5:52 am, Bernd Oppolzer wrote:

The only reason why your Python code is shorter is because you use
the builtin os.walk method to walk through the directory recursively.

Isn't that the point? Python has an enormous standard library to do
useful things. Also note the use of iterators (or generators). In most
languages I use you can turn a subroutine inside out
that returns a value using "yield". The advantages of this model should
be obvious. If you wanted to grab the first 10 items from a list of
100,000 you don't need to build the entire list as you would with REXX.

Going back to Charles original requirement and why I piped up. Charles
knows C++ so I don't understand why he would pick REXX for a z/OS UNIX

--
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: Some questions on SYSCALL

2022-06-30 Thread Bernd Oppolzer

Two short comments to add some heat to the discussion;
sorry for that ... I have to leave for the next two days, so I will not 
be able to follow

what happens, but anyway:

1) to David: this is only personal view, not a valid argument (not 
backed by facts);

IMO REXX has many unique features which make it easy and comfortable to use
not found elsewhere. I wrote a generator, which creates ASSEMBLER 
programs to
convert SOAP messages to COBOL structures (CommAreas) for CICS on VSE 
completely in REXX
(as a replacement for an IBM tool, which didn't work well ... 2000 lines 
of REXX).
This has been done, because REXX was the best language available at the 
customer's site
for the task. In the 1990s, I wrote a plotter server to support a 
CalComp plotter in REXX
(on VM); the pictures drawn by the applications were adjusted on the 
plotter output
optimizing the use of the paper and every 15 minutes the results of the 
optimization
was sent to the plotter. The REXX was active all the time 24/7 in a VM 
machine running
DISCONNECTED. The pictures were sent as RDR files to this machine, and 
the plotter

was attached as PRT.

2) to Charles: 13 hours? My C solution would have taken me half an hour 
at most,
if only writing the file is counted and not the collecting of the 
information,

which I cannot comment on, because I don't know the complexity.

Kind regards

Bernd


Am 30.06.2022 um 08:58 schrieb David Crayford:
REXX is never the right language unless you have no choice, such as 
using an API such as SDSF or an environment such as Netview.


On 30/06/2022 11:21 am, Charles Mills wrote:

Charles knows C++ so I don't understand why he would pick REXX
One factor is that my deployment machine does not have a C++ compiler 
and does not share DASD with my development machine. So for C++ the 
cycle is


- Edit in IDE on Windows
- Build in IDE on Windows; get to clean compile
- Upload to development machine
- Build on z/OS (hopefully no z-specific errors; if so, iterate)
- Copy load module from development to deployment (complex load 
module FTP)

- Test
- Repeat as necessary

For Rexx OTOH the cycle is
- Edit in text editor in Windows
- Upload to deployment machine (simple ASCII text upload)
- Test
- Repeat as necessary


You need a better IDE. I recommend Intellij.


A much faster development cycle.

I built, tested and deployed the new HLASM module and the Rexx code 
in about 13 hours billable (including all the discussion here). I 
doubt that I could have done that with C++. There is more to "best 
language for the job" than elegance, conciseness, "modernness" and 
efficiency of execution.


For Python there is no way of knowing, but I think I might have spent 
that much time trying to get Python downloaded and installed. IBM 
manages to make the most simple tasks difficult. For one of the two 
machines I would have had a "business" or "legal" issue that might 
have taken 13 hours; certainly would have taken weeks elapsed. And 
that is before any "learning Python" issues. I am sure it is a 
wonderful language, but I think it is wishful thinking to say "see, 
you had some API issues with Rexx; therefore you would have been 
better off with Python." I suspect I might have had some API issues 
with my first Python program. 


Also, I get great Rexx community support right here on this forum. 
Where would I go for mainframe-specific Python community support? I'm 
sure there is some relevant forum, but how active is it? OT, but I 
have gotten pretty unhappy with Stack Overflow. Too many questions 
there now seem to draw a "not a perfect question" rebuke from some 
self-important moderator.


BTW, I do think I might want to learn Python. I bought an O'Reilly 
textbook. I have a six-hour flight coming up, and I think that it 
might be just perfect for learning Python.


Charles




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


Re: Some questions on SYSCALL

2022-06-30 Thread David Crayford
REXX is never the right language unless you have no choice, such as 
using an API such as SDSF or an environment such as Netview.


On 30/06/2022 11:21 am, Charles Mills wrote:

Charles knows C++ so I don't understand why he would pick REXX

One factor is that my deployment machine does not have a C++ compiler and does 
not share DASD with my development machine. So for C++ the cycle is

- Edit in IDE on Windows
- Build in IDE on Windows; get to clean compile
- Upload to development machine
- Build on z/OS (hopefully no z-specific errors; if so, iterate)
- Copy load module from development to deployment (complex load module FTP)
- Test
- Repeat as necessary

For Rexx OTOH the cycle is
- Edit in text editor in Windows
- Upload to deployment machine (simple ASCII text upload)
- Test
- Repeat as necessary


You need a better IDE. I recommend Intellij.


A much faster development cycle.

I built, tested and deployed the new HLASM module and the Rexx code in about 13 hours billable 
(including all the discussion here). I doubt that I could have done that with C++. There is more to 
"best language for the job" than elegance, conciseness, "modernness" and 
efficiency of execution.

For Python there is no way of knowing, but I think I might have spent that much time trying to get Python downloaded and 
installed. IBM manages to make the most simple tasks difficult. For one of the two machines I would have had a 
"business" or "legal" issue that might have taken 13 hours; certainly would have taken weeks elapsed. And 
that is before any "learning Python" issues. I am sure it is a wonderful language, but I think it is wishful 
thinking to say "see, you had some API issues with Rexx; therefore you would have been better off with Python." I 
suspect I might have had some API issues with my first Python program. 

Also, I get great Rexx community support right here on this forum. Where would I go for 
mainframe-specific Python community support? I'm sure there is some relevant forum, but 
how active is it? OT, but I have gotten pretty unhappy with Stack Overflow. Too many 
questions there now seem to draw a "not a perfect question" rebuke from some 
self-important moderator.

BTW, I do think I might want to learn Python. I bought an O'Reilly textbook. I 
have a six-hour flight coming up, and I think that it might be just perfect for 
learning Python.

Charles


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of David Crayford
Sent: Wednesday, June 29, 2022 3:27 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On 30/06/2022 5:52 am, Bernd Oppolzer wrote:

The only reason why your Python code is shorter is because you use
the builtin os.walk method to walk through the directory recursively.

Isn't that the point? Python has an enormous standard library to do
useful things. Also note the use of iterators (or generators). In most
languages I use you can turn a subroutine inside out
that returns a value using "yield". The advantages of this model should
be obvious. If you wanted to grab the first 10 items from a list of
100,000 you don't need to build the entire list as you would with REXX.

Going back to Charles original requirement and why I piped up. Charles
knows C++ so I don't understand why he would pick REXX for a z/OS UNIX

--
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: Some questions on SYSCALL

2022-06-29 Thread Paul Gilmartin
On Wed, 29 Jun 2022 20:22:10 -0700, Charles Mills wrote:

>...
>"99 Bottles of Beer" is more concise in C++ than in Python, and MUCH more 
>concise in BASIC. Does that make BASIC a better language? 
>https://en.wikipedia.org/wiki/99_Bottles_of_Beer 
>
The BASIC is 219 characters.  I converted it slavishly to Rexx.  32 characters 
shorter -- 187:

do Bottle = 100 TO 1 by -1
 say Bottle "bottles of beer on the wall," Bottle "bottles of beer"
 say "Take one down and pass it around," Bottle-1 "bottles of beer on the wall"
end Bottle

Does that make Rexx a worse language?

(We don't need no steenkin' "||"!)

-- 
gil

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


Re: Some questions on SYSCALL

2022-06-29 Thread Charles Mills
If succinctness is the criterion, shouldn't everyone be using APL instead of 
COBOL?

Python is not as succinct as it might be. My understanding is that Python uses 
AND and OR rather than the more common & and | or && and ||. Up to two more 
keystrokes each! Is that a bad thing?

For any language I suspect it is easy for an aficionado to pick a task for 
which the language is particularly well suited. 

"99 Bottles of Beer" is more concise in C++ than in Python, and MUCH more 
concise in BASIC. Does that make BASIC a better language? 
https://en.wikipedia.org/wiki/99_Bottles_of_Beer 

Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of David Crayford
Sent: Wednesday, June 29, 2022 2:24 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On 30/06/2022 4:22 am, Bernd Oppolzer wrote:
>>
> This is an old OS/2 REXX program (from the 1990s, IIRC),
> used to traverse a directory tree recursively and issue a command in 
> every subdirectory found:
>
>
> /* rexx */
>
> arg command
>
> call RxFuncAdd "SysLoadFuncs", "REXXUTIL", "SysLoadFuncs"
> call SysLoadFuncs
>
> dir = directory()
> if right(dir,1) = "\" then
>dir = left(dir, length(dir) - 1)
>
> call tree dir, command
>
> x = directory(dir)
>
> exit
>
>
> tree: procedure
>
>arg dir, command
>
>say "*** Verzeichnis in Bearbeitung: "dir" ***"
>
>x = directory(dir)
>
>command
>
>rc = SysFileTree("*.*", verz, "D")
>do i = 1 to verz.0
>   dir = word(verz.i, 5)
>   call tree dir, command
>end
>
>return
>
>
> you may notice the recursive call of the procedure "tree".
>
> I don't see any justification for your REXX bashing;
> it's just another flavor of scripting language, which allows to do 
> great things,
> once you manage to use it.

Sorry Brend, but I don't consider that snippet to be great! It's a 
perfect example of flabby, verbose REXX code. The only justification for 
using REXX is that you personally favor the language. Python is far more 
succinct.

|for| |root, dirs, files ||in| |os.walk(path_of_the_directory):|
|||for| |i ||in| |files:|
|||print||(os.path.join(root, i))|

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


Re: Some questions on SYSCALL

2022-06-29 Thread Charles Mills
> Charles knows C++ so I don't understand why he would pick REXX

One factor is that my deployment machine does not have a C++ compiler and does 
not share DASD with my development machine. So for C++ the cycle is

- Edit in IDE on Windows
- Build in IDE on Windows; get to clean compile
- Upload to development machine
- Build on z/OS (hopefully no z-specific errors; if so, iterate)
- Copy load module from development to deployment (complex load module FTP)
- Test
- Repeat as necessary

For Rexx OTOH the cycle is
- Edit in text editor in Windows
- Upload to deployment machine (simple ASCII text upload)
- Test
- Repeat as necessary

A much faster development cycle. 

I built, tested and deployed the new HLASM module and the Rexx code in about 13 
hours billable (including all the discussion here). I doubt that I could have 
done that with C++. There is more to "best language for the job" than elegance, 
conciseness, "modernness" and efficiency of execution.

For Python there is no way of knowing, but I think I might have spent that much 
time trying to get Python downloaded and installed. IBM manages to make the 
most simple tasks difficult. For one of the two machines I would have had a 
"business" or "legal" issue that might have taken 13 hours; certainly would 
have taken weeks elapsed. And that is before any "learning Python" issues. I am 
sure it is a wonderful language, but I think it is wishful thinking to say 
"see, you had some API issues with Rexx; therefore you would have been better 
off with Python." I suspect I might have had some API issues with my first 
Python program. 

Also, I get great Rexx community support right here on this forum. Where would 
I go for mainframe-specific Python community support? I'm sure there is some 
relevant forum, but how active is it? OT, but I have gotten pretty unhappy with 
Stack Overflow. Too many questions there now seem to draw a "not a perfect 
question" rebuke from some self-important moderator.

BTW, I do think I might want to learn Python. I bought an O'Reilly textbook. I 
have a six-hour flight coming up, and I think that it might be just perfect for 
learning Python.

Charles


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of David Crayford
Sent: Wednesday, June 29, 2022 3:27 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On 30/06/2022 5:52 am, Bernd Oppolzer wrote:
> The only reason why your Python code is shorter is because you use
> the builtin os.walk method to walk through the directory recursively.

Isn't that the point? Python has an enormous standard library to do 
useful things. Also note the use of iterators (or generators). In most 
languages I use you can turn a subroutine inside out
that returns a value using "yield". The advantages of this model should 
be obvious. If you wanted to grab the first 10 items from a list of 
100,000 you don't need to build the entire list as you would with REXX.

Going back to Charles original requirement and why I piped up. Charles 
knows C++ so I don't understand why he would pick REXX for a z/OS UNIX 

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


Re: Some questions on SYSCALL

2022-06-29 Thread Bob Bridges
I approve of civil discourse, and I'd hate to discourage anyone from asking 
civilly for it.  But I've been enjoying this one; yes, a few of the 
participants have waxed quarrelsome, but only a little, and briefly.  And as 
Messrs Farley and Smith agree, this has been informative too.

(I also have to admit that my own definition of "civil" is a little more robust 
than some folks'.)

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

/* There can, of course, be no disproof of the existence of God -- particularly 
a sufficiently subtle God.  But it is a kindness neither to science nor 
religion to leave unchallenged inadequate arguments for the existence of God.  
Moreover, debates on such questions are good fun, and at the very least, hone 
the mind for useful work.  -Carl Sagan, from "Broca's Brain" */

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Steve Smith
Sent: Wednesday, June 29, 2022 18:55

I feel compelled to object.  This argument has been perfectly civil, is 
completely pertinent, and surely has value in opening up some eyes about 
options for getting things done the "best" way.   Yeah, the "best" is 
subjective, but sometimes a bit of argument will lead to some enlightenment... 
if not for the posters, maybe some silent watchers.

Lord knows it has been far more valuable than much of the garbage that passes 
through here.

--- On Wed, Jun 29, 2022 at 6:38 PM Farley, Peter x23353 < 
031df298a9da-dmarc-requ...@listserv.ua.edu> wrote:
> Gentle listers,
>
> Can we all agree to let this discussion be resolved by agreeing to the 
> Perl mongers motto, TMTOWTDI?
>
> I think the discussion you have had so far is more than sufficient.  I 
> would also suggest that you take it offline if you would prefer to 
> continue along these lines.
>
> I will say in defense of parts of this discussion that I learned a few 
> things about Rexx on z/OS that I previously had not encountered and 
> which will give me assistance in future activities, so thank you to 
> the contributing posters for those nuggets of knowledge.

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


Re: Some questions on SYSCALL

2022-06-29 Thread David Crayford

On 30/06/2022 5:33 am, Paul Gilmartin wrote:

On Wed, 29 Jun 2022 22:22:39 +0200, Bernd Oppolzer wrote:

This is an old OS/2 REXX program (from the 1990s, IIRC),
used to traverse a directory tree recursively and issue a command in
every subdirectory found:

... with local variables protected by "procedure".


Protected? That's a good one! Another reason to hate on REXX is the lack 
of lexical scoping. It's ok for small programs but as soon as you start 
to scale
it's a nightmare when you"i" loop counter gets clobbered in a 
subroutine. "procedure" helps but then you have to use "expose" which 
normally results in
using a compound global variable such as g._namespace. REXX is a 
language that you program into.


You have choices on z/OS now kids!

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


Re: Some questions on SYSCALL

2022-06-29 Thread Steve Smith
I feel compelled to object.  This argument has been perfectly civil, is
completely pertinent, and surely has value in opening up some eyes about
options for getting things done the "best" way.   Yeah, the "best" is
subjective, but sometimes a bit of argument will lead to some
enlightenment... if not for the posters, maybe some silent watchers.

Lord knows it has been far more valuable than much of the garbage that
passes through here.

sas


On Wed, Jun 29, 2022 at 6:38 PM Farley, Peter x23353 <
031df298a9da-dmarc-requ...@listserv.ua.edu> wrote:

> Gentle listers,
>
> Can we all agree to let this discussion be resolved by agreeing to the
> Perl mongers motto, TMTOWTDI?
>
> I think the discussion you have had so far is more than sufficient.  I
> would also suggest that you take it offline if you would prefer to continue
> along these lines.
>
> I will say in defense of parts of this discussion that I learned a few
> things about Rexx on z/OS that I previously had not encountered and which
> will give me assistance in future activities, so thank you to the
> contributing posters for those nuggets of knowledge.
>
> Peter
>
>

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


Re: Some questions on SYSCALL

2022-06-29 Thread David Crayford

On 30/06/2022 6:37 am, Farley, Peter x23353 wrote:

Gentle listers,

Can we all agree to let this discussion be resolved by agreeing to the Perl 
mongers motto, TMTOWTD
TWTOWTD? Or maybe not. Show me how to create a secure socket in REXX 
without using PAGENT.





I think the discussion you have had so far is more than sufficient.  I would 
also suggest that you take it offline if you would prefer to continue along 
these lines.

I will say in defense of parts of this discussion that I learned a few things 
about Rexx on z/OS that I previously had not encountered and which will give me 
assistance in future activities, so thank you to the contributing posters for 
those nuggets of knowledge.

Peter
--

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


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


Re: Some questions on SYSCALL

2022-06-29 Thread Farley, Peter x23353
Gentle listers,

Can we all agree to let this discussion be resolved by agreeing to the Perl 
mongers motto, TMTOWTDI?

I think the discussion you have had so far is more than sufficient.  I would 
also suggest that you take it offline if you would prefer to continue along 
these lines.

I will say in defense of parts of this discussion that I learned a few things 
about Rexx on z/OS that I previously had not encountered and which will give me 
assistance in future activities, so thank you to the contributing posters for 
those nuggets of knowledge.

Peter
--

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: Some questions on SYSCALL

2022-06-29 Thread David Crayford

On 30/06/2022 5:52 am, Bernd Oppolzer wrote:

The only reason why your Python code is shorter is because you use
the builtin os.walk method to walk through the directory recursively.


Isn't that the point? Python has an enormous standard library to do 
useful things. Also note the use of iterators (or generators). In most 
languages I use you can turn a subroutine inside out
that returns a value using "yield". The advantages of this model should 
be obvious. If you wanted to grab the first 10 items from a list of 
100,000 you don't need to build the entire list as you would with REXX.


Going back to Charles original requirement and why I piped up. Charles 
knows C++ so I don't understand why he would pick REXX for a z/OS UNIX 
solution. It's the worst language for the job and I stand by
that assertion in that he is already asking questions on here about the 
API.


Python is a first class language on z/OS now. You can't write an ISPF 
macro in Python but you can write Instagram, which uses the Django 
framework. No contest!




A similar method could have been used in my REXX example, too,
but I wanted a command to be issued in every subdirectory
when walking through the tree,
so I had to do the recursive directory walk myself, using the 
recursive call

to the tree procedure. This is what makes my coding longer,
but this is not due to the REXX language. Be fair.

To call this verbose is simply wrong, and you are missing the point 
completely;
please show me how your Python solution looks, if you also walk the 
directory tree
by yourself and issue a command given as a parameter at every 
subdirectory

and not only print the name.

but I don't really want to argue on this ... this seems like a waste 
ot time.


I use the tools I have at hand ... and I didn't have Python in 1998 on 
my OS/2 boxes.
This has nothing to do with personal favor; I use the tools which make 
the most
sense for me, given my knowledge or my personal skills (which can of 
course

change or improve over time).

Earlier in a similar thread I told you or other posters how easy it is 
to append

small pieces of information every 15 minutes to a file using IBM's C
and still having a large blocksize etc. ... and how I would support
the simultaneous update and the reporting. The thread degraded into a
discussion about started tasks and how to implement the operator commands
to control the STCs using REXX or other languages ... again: what a 
waste of time.
For appending information to a file every 15 minutes, I would create a 
batch job
which is started every 15 minutes, controlled by UC4 or cron or 
whatever you have
... and which terminates after some milliseconds. No need for a 
started task,

which is idle most of the time.

I miss sometimes a certain cost sensitivity with the discussions here 
in IBM-MAIN,

but this should be part of our profession.

Kind regards

Bernd



Am 29.06.2022 um 23:24 schrieb David Crayford:

On 30/06/2022 4:22 am, Bernd Oppolzer wrote:



This is an old OS/2 REXX program (from the 1990s, IIRC),
used to traverse a directory tree recursively and issue a command in 
every subdirectory found:



/* rexx */

arg command

call RxFuncAdd "SysLoadFuncs", "REXXUTIL", "SysLoadFuncs"
call SysLoadFuncs

dir = directory()
if right(dir,1) = "\" then
   dir = left(dir, length(dir) - 1)

call tree dir, command

x = directory(dir)

exit


tree: procedure

   arg dir, command

   say "*** Verzeichnis in Bearbeitung: "dir" ***"

   x = directory(dir)

   command

   rc = SysFileTree("*.*", verz, "D")
   do i = 1 to verz.0
  dir = word(verz.i, 5)
  call tree dir, command
   end

   return


you may notice the recursive call of the procedure "tree".

I don't see any justification for your REXX bashing;
it's just another flavor of scripting language, which allows to do 
great things,

once you manage to use it.


Sorry Brend, but I don't consider that snippet to be great! It's a 
perfect example of flabby, verbose REXX code. The only justification 
for using REXX is that you personally favor the language. Python is 
far more succinct.


|for| |root, dirs, files ||in| |os.walk(path_of_the_directory):|
|||for| |i ||in| |files:|
|||print||(os.path.join(root, i))|


--
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: Some questions on SYSCALL

2022-06-29 Thread Bernd Oppolzer

The only reason why your Python code is shorter is because you use
the builtin os.walk method to walk through the directory recursively.
A similar method could have been used in my REXX example, too,
but I wanted a command to be issued in every subdirectory
when walking through the tree,
so I had to do the recursive directory walk myself, using the recursive 
call

to the tree procedure. This is what makes my coding longer,
but this is not due to the REXX language. Be fair.

To call this verbose is simply wrong, and you are missing the point 
completely;
please show me how your Python solution looks, if you also walk the 
directory tree

by yourself and issue a command given as a parameter at every subdirectory
and not only print the name.

but I don't really want to argue on this ... this seems like a waste ot 
time.


I use the tools I have at hand ... and I didn't have Python in 1998 on 
my OS/2 boxes.
This has nothing to do with personal favor; I use the tools which make 
the most

sense for me, given my knowledge or my personal skills (which can of course
change or improve over time).

Earlier in a similar thread I told you or other posters how easy it is 
to append

small pieces of information every 15 minutes to a file using IBM's C
and still having a large blocksize etc. ... and how I would support
the simultaneous update and the reporting. The thread degraded into a
discussion about started tasks and how to implement the operator commands
to control the STCs using REXX or other languages ... again: what a 
waste of time.
For appending information to a file every 15 minutes, I would create a 
batch job
which is started every 15 minutes, controlled by UC4 or cron or whatever 
you have
... and which terminates after some milliseconds. No need for a started 
task,

which is idle most of the time.

I miss sometimes a certain cost sensitivity with the discussions here in 
IBM-MAIN,

but this should be part of our profession.

Kind regards

Bernd



Am 29.06.2022 um 23:24 schrieb David Crayford:

On 30/06/2022 4:22 am, Bernd Oppolzer wrote:



This is an old OS/2 REXX program (from the 1990s, IIRC),
used to traverse a directory tree recursively and issue a command in 
every subdirectory found:



/* rexx */

arg command

call RxFuncAdd "SysLoadFuncs", "REXXUTIL", "SysLoadFuncs"
call SysLoadFuncs

dir = directory()
if right(dir,1) = "\" then
   dir = left(dir, length(dir) - 1)

call tree dir, command

x = directory(dir)

exit


tree: procedure

   arg dir, command

   say "*** Verzeichnis in Bearbeitung: "dir" ***"

   x = directory(dir)

   command

   rc = SysFileTree("*.*", verz, "D")
   do i = 1 to verz.0
  dir = word(verz.i, 5)
  call tree dir, command
   end

   return


you may notice the recursive call of the procedure "tree".

I don't see any justification for your REXX bashing;
it's just another flavor of scripting language, which allows to do 
great things,

once you manage to use it.


Sorry Brend, but I don't consider that snippet to be great! It's a 
perfect example of flabby, verbose REXX code. The only justification 
for using REXX is that you personally favor the language. Python is 
far more succinct.


|for| |root, dirs, files ||in| |os.walk(path_of_the_directory):|
|||for| |i ||in| |files:|
|||print||(os.path.join(root, i))|


--
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: Some questions on SYSCALL

2022-06-29 Thread Paul Gilmartin
On Wed, 29 Jun 2022 22:22:39 +0200, Bernd Oppolzer wrote:
>>
>This is an old OS/2 REXX program (from the 1990s, IIRC),
>used to traverse a directory tree recursively and issue a command in
>every subdirectory found:
> 
>
z/OS Rexx ought to be able to do likewise with SYSCALL readdir:
.
...
>   dir = word(verz.i, 5)
>   
Might that be misled by pathnames containing blanks?

>you may notice the recursive call of the procedure "tree".
> 
... with local variables protected by "procedure".

-- 
gil

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


Re: Some questions on SYSCALL

2022-06-29 Thread David Crayford

On 30/06/2022 4:22 am, Bernd Oppolzer wrote:



This is an old OS/2 REXX program (from the 1990s, IIRC),
used to traverse a directory tree recursively and issue a command in 
every subdirectory found:



/* rexx */

arg command

call RxFuncAdd "SysLoadFuncs", "REXXUTIL", "SysLoadFuncs"
call SysLoadFuncs

dir = directory()
if right(dir,1) = "\" then
   dir = left(dir, length(dir) - 1)

call tree dir, command

x = directory(dir)

exit


tree: procedure

   arg dir, command

   say "*** Verzeichnis in Bearbeitung: "dir" ***"

   x = directory(dir)

   command

   rc = SysFileTree("*.*", verz, "D")
   do i = 1 to verz.0
  dir = word(verz.i, 5)
  call tree dir, command
   end

   return


you may notice the recursive call of the procedure "tree".

I don't see any justification for your REXX bashing;
it's just another flavor of scripting language, which allows to do 
great things,

once you manage to use it.


Sorry Brend, but I don't consider that snippet to be great! It's a 
perfect example of flabby, verbose REXX code. The only justification for 
using REXX is that you personally favor the language. Python is far more 
succinct.


|for| |root, dirs, files ||in| |os.walk(path_of_the_directory):|
|||for| |i ||in| |files:|
|||print||(os.path.join(root, i))|


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


Re: Some questions on SYSCALL

2022-06-29 Thread Bernd Oppolzer

Am 29.06.2022 um 14:06 schrieb David Crayford:

On 29/06/2022 6:37 pm, Seymour J Metz wrote:
Sme, but manageable. The article Safe REXX at 
 and 
 has some tips on 
avoiding REXX pitfalls.


What's the point in managing something when you can just use a better 
language? It's a good time to be working on z/OS as we have an 
abundance of choice. That's not entirely obvious on this forum where 
every problem seems to be met with a ham-fisted REXX solution.


Yes, Crayford's bashing REXX again. I have some experience of using 
z/OS UNIX REXX services but I didn't find it productive. Maybe 
somebody with more knowledge than me could post a snippet that 
demonstrates how to recursively traverse a directory tree printing the 
entries.





This is an old OS/2 REXX program (from the 1990s, IIRC),
used to traverse a directory tree recursively and issue a command in 
every subdirectory found:



/* rexx */

arg command

call RxFuncAdd "SysLoadFuncs", "REXXUTIL", "SysLoadFuncs"
call SysLoadFuncs

dir = directory()
if right(dir,1) = "\" then
   dir = left(dir, length(dir) - 1)

call tree dir, command

x = directory(dir)

exit


tree: procedure

   arg dir, command

   say "*** Verzeichnis in Bearbeitung: "dir" ***"

   x = directory(dir)

   command

   rc = SysFileTree("*.*", verz, "D")
   do i = 1 to verz.0
  dir = word(verz.i, 5)
  call tree dir, command
   end

   return


you may notice the recursive call of the procedure "tree".

I don't see any justification for your REXX bashing;
it's just another flavor of scripting language, which allows to do great 
things,

once you manage to use it.

Kind regards

Bernd

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


Re: Some questions on SYSCALL

2022-06-29 Thread Farley, Peter x23353
Bill,

Your input and advice and "tools and toys" for z/OS have been most helpful to 
so many of us over all these years.  Thank you for everything you have done for 
us.

May you enjoy good health and a relaxed retirement.  All the best.

Peter

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Bill Schoen
Sent: Wednesday, June 29, 2022 8:48 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

There are quite a few topics in this thread, some well addressed, some maybe 
not, but I'll pitch in...

re: syscalls environment should be integrated into rexx this is included in the 
default environments for rexx running in mvs (irxjcl), tso, and ispf calling 
syscalls('ON') is not required to use address syscall all that does is define 
the syscall variables The only reason I can imagine if you get errors if not 
using syscalls() is you probably have replacements for the default environments 
that were probably made a long time ago and do not include syscall.

re: syscalls('ON') and return code
used as above is a function call which does return a return code.
if you don't assign that to a variable or use it in an expression or use call, 
the rexx processor will execute the return code in the current address 
environment as a command

re: syscalls('OFF')
this causes your process to undub which is typically unnecessary and often 
results in confusion

re: write buffer is a variable name
This was done for a variety of reasons, but primarily, rexx has a limit to 
number of parameters that can be passed to an address environment.
I think TSO rexx limits it to 20.  If it took a string you would be limited to 
very few blank delimited words.
a number of syscall commands take variable/stem names to avoid issues with 
input or output rexx restrictions.
.
Probably my last post before retirement tomorrow.
Bill Schoen
--

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: Some questions on SYSCALL

2022-06-29 Thread Gord Tomlin

On 2022-06-29 08:48 AM, Bill Schoen wrote:

Probably my last post before retirement tomorrow.


Enjoy your retirement, Bill!

--

Regards, Gord Tomlin
Action Software International
(a division of Mazda Computer Corporation)
Tel: (905) 470-7113, Fax: (905) 470-6507
Support: https://actionsoftware.com/support/

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


Re: Some questions on SYSCALL

2022-06-29 Thread David Spiegel

Hi Bob,
"... Or are you thinking that you can make sure there's an END for each 
one? ..."


Yes ... Here is an example: X ALL; F ALL Do 10;F All END 10

Regards,
David

On 2022-06-29 11:39, Bob Bridges wrote:

My first language was a subset of PL/1, and I still think it's a great 
language, but there doesn't seem to be much call for it at the clients I serve. 
 I didn't know PL/1 programmers indent the END with the paragraph; I thought it 
was just my preference, but maybe I learned it earlier than I thought.

I don't follow what you're saying about ISPF.  If I indent the END, then I can 
use eXclude and Show to reveal the start of code blocks in certain column 
numbers without the END obtruding, which (it seems to me) is just what I would 
want.  Or are you thinking that you can make sure there's an END for each one?  
I guess that would work.

Usually I test a program as I'm developing it, running it in its unfinished 
state every so often to be sure that the parts I've written so far are working 
correctly before going on to the next part.  So, for example, I read the input 
data and table it, and generate a SAY statement to be sure it's parsing the 
input correctly.  Then I delete that SAY and write the next part, with SAY 
statements to convince me it work, and so on.  But occasionally I complete a 
large amount of code, only to have REXX tell me that I'm missing and END 
somewhere.  It's usually not hard to go through the program and check each 
block of code, but yeah, a couple of times a year the problem hides from me for 
15 minutes or so.

I've written stuff in ISPPF, but never long enough for this to be a problem.  
If it needs to be that complex I write an external REXX.

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

/* If it could be demonstrated that any complex organ existed which could not 
possibly have been formed by numerous, successive, slight modifications, my 
theory would absolutely break down.  -Charles Darwin, _On the Origin of 
Species_, first edition p189. */

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
David Spiegel
Sent: Wednesday, June 29, 2022 10:47

When I programmed PL/I 40+ year ago, lining up the END; with the body was de 
rigeur. Initially, of course, that was using cards.

When ISPF (or XEDIT) came along, lining up the END: with DO/SELECT etc. made a 
lot more sense since excluded lines could be shown by column number containing 
DO/END/SELECT etc.  (This made debugging easier.)

--
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: Some questions on SYSCALL

2022-06-29 Thread Bob Bridges
My first language was a subset of PL/1, and I still think it's a great 
language, but there doesn't seem to be much call for it at the clients I serve. 
 I didn't know PL/1 programmers indent the END with the paragraph; I thought it 
was just my preference, but maybe I learned it earlier than I thought.

I don't follow what you're saying about ISPF.  If I indent the END, then I can 
use eXclude and Show to reveal the start of code blocks in certain column 
numbers without the END obtruding, which (it seems to me) is just what I would 
want.  Or are you thinking that you can make sure there's an END for each one?  
I guess that would work.

Usually I test a program as I'm developing it, running it in its unfinished 
state every so often to be sure that the parts I've written so far are working 
correctly before going on to the next part.  So, for example, I read the input 
data and table it, and generate a SAY statement to be sure it's parsing the 
input correctly.  Then I delete that SAY and write the next part, with SAY 
statements to convince me it work, and so on.  But occasionally I complete a 
large amount of code, only to have REXX tell me that I'm missing and END 
somewhere.  It's usually not hard to go through the program and check each 
block of code, but yeah, a couple of times a year the problem hides from me for 
15 minutes or so.

I've written stuff in ISPPF, but never long enough for this to be a problem.  
If it needs to be that complex I write an external REXX.

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

/* If it could be demonstrated that any complex organ existed which could not 
possibly have been formed by numerous, successive, slight modifications, my 
theory would absolutely break down.  -Charles Darwin, _On the Origin of 
Species_, first edition p189. */

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
David Spiegel
Sent: Wednesday, June 29, 2022 10:47

When I programmed PL/I 40+ year ago, lining up the END; with the body was de 
rigeur. Initially, of course, that was using cards.

When ISPF (or XEDIT) came along, lining up the END: with DO/SELECT etc. made a 
lot more sense since excluded lines could be shown by column number containing 
DO/END/SELECT etc.  (This made debugging easier.)

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


Re: Some questions on SYSCALL

2022-06-29 Thread David Crayford

On 29/06/2022 11:07 pm, Rony G. Flatscher wrote:

Hi David,

On 29.06.2022 15:54, David Crayford wrote:
I know ooRexx. I ported it to z/OS 10 years ago but it was buggy and 
slow. 


Hmm, ten years ago? Over time there has been so much improvements in 
these and other areas including a testing framework with quite a 
comprehensive coverage of the ooRexx interpreter.


There is zero chance of IBM or a vendor wasting resources on REXX 
today as there is no market for it. 


Hmm, so you speak for IBM? The REXX infrastructure, the REXX experts, 
the ability to learn REXX (and ooRexx for that matter) in a short 
time, becoming empowered to solve mainframe based problems quickly and 
the like does not constitute a USP (uinque selling proposition on the 
market)?


I don't speak for IBM but we provide the SciPy libraries for the IBM 
AI/ML products.






Now we have Python on z/OS REXX is very much a legacy language. 
That's even more pertinent with the shift from TSO/ISPF to IDEs.


Hmm, so Python is the end of the world as it solves everything? No 
other language stands a chance anymore?


Python isn't my favorite language I just can't see any use for REXX 
outside of TSO/ISPF.





I could be wrong and I'm willing to be turned. I'm a big fan of Lua 
which I consider to be the most elegant language I know. 


Sure, Lua - like many other languages following different paradigms - 
is an interesting language, but it could not be used to teach Business 
administration students programming from scratch within four months to 
the extent that in the end they would be able to program Windows, MSO, 
create complex, portable GUIs etc. on their own. It can be done with 
ooRexx (and the BSF4ooRexx function library bridging ooRexx and Java), 
believe it or not. As a result it is cheaper to learn ooRexx, and the 
problem solving capacity one gains with it quickly is really quite 
unparalleled.


Having REXX/ooRexx one is able to easily orchestrate and control other 
software. If need be one can bridge REXX/ooRexx easily with 
specialized software like database management systems (who would write 
one in REXX or Python for that matter) and the like.


In today's world I would deploy Java everywhere and exploit Java class 
libraries as much as possible from other languages, if need be. For 
the latter to be feasible you need a flexible, dynamical and easy to 
use language which is proven, which can be said of ooRexx with the 
ooRexx-Java bridge.



It can easily be used to write DSLs for configuration or model 
development. How do I write a DSL in REXX?


Why would I want to? Why not: "How do I write a DSL in C++?"



https://leafo.net/guides/dsl-in-lua.html


REXX is such an easy programming language that one does not need to 
create yet another language to make it usable. ;)


If really needed one could create DSLs with ooRexx  as with any other 
programming language, of course.
Really? Lua supports closures which is why it can be used for DSLs. REXX 
does not. You would need to write a parser.


---rony




On 29/06/2022 9:41 pm, Rony G. Flatscher wrote:

Hi David,

On 29.06.2022 14:06, David Crayford wrote:

On 29/06/2022 6:37 pm, Seymour J Metz wrote:
Sme, but manageable. The article Safe REXX at 
 and 
 has some tips on 
avoiding REXX pitfalls.


What's the point in managing something when you can just use a 
better language? It's a good time to be working on z/OS as we have 
an abundance of choice. That's not entirely obvious on this forum 
where every problem seems to be met with a ham-fisted REXX solution.


Yes, Crayford's bashing REXX again. I have some experience of using 
z/OS UNIX REXX services but I didn't find it productive. Maybe 
somebody with more knowledge than me could post a snippet that 
demonstrates how to recursively traverse a directory tree printing 
the entries.


The problem is that this is not constructive. Not sure why it is so 
important for you to bash REXX even if it makes you look bad at times.


REXX in the mainframe world (I learned REXX for the first time on a 
VM/CMS 370 system a few decades ago) is of course a great - and 
unmatched - productivity tool and as a result over the decades there 
has been an incredible amount of useful REXX inventory created.  
Best, REXX is easy to learn and easy to use like no other language 
of that power.


If you were to know ooRexx you would realize that porting it to the 
mainframe would even help yourself and everyone else to settle on a 
few important languages and not being forced to go astray with this 
language for solving this particular problem, that language for 
solving that particular problem, and then suggesting to use yet 
another language for ...


Porting ooRexx to the mainframe would allow for keeping the existing 
REXX programs running with ooRexx (the design of ooRexx - by demand 
of IBM's customers - is such that it is compatible with 

Re: Some questions on SYSCALL

2022-06-29 Thread David Crayford


On 29/06/2022 10:48 pm, Seymour J Metz wrote:

Have you stopped beating your wife? There is no agreement of what is a better language, 
much less a description of the context in which to evaluate "better".
You really are a huge twat. Why don't you just bugger off. You won't be 
missed.



From: IBM Mainframe Discussion List  on behalf of David 
Crayford 
Sent: Wednesday, June 29, 2022 8:06 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On 29/06/2022 6:37 pm, Seymour J Metz wrote:

Sme, but manageable. The article Safe REXX at 
<http://secure-web.cisco.com/18tXxLjz2q-nDjE3Fk3aQsvRJpFcP22D9GKeoWSbitPmfcGAttYHjb-kP18U8Ikl-aTGx-pwraxaebV32MLF29JU1T5PHRSawvmtcOGrlNGx7qinsWE4REjw9lBM0v-qPHaExEKTjFI5whqyzgNqyyP8lJXknHgVjB9cG81on4LMjV-ujVAqpW3I-PSQoBgSx1-68Dt9t0tiiiZC2mDbYmhMIfA34222KIpNnr3jIWqO2GmhJvocQ6YsZ4LFzMypLVDsEzR1jq2yHlrf-j3yNYMBOBBgbawlGvlwTlhcDmyj5VUWQPczUZkWLHAwKtz8DidQWTRQb3gMsJzKiE-WSx1GWdm6Q0IiDjs2_Omg4xTOuCBtUymaNKzQUCYdHr65JzHggOCeIsQlhDwHMCl30Fku0q_ApFl2GTV8nFoXiCad0H0PKU9S6UZqHhGLy0ZqE/http%3A%2F%2Fwww.rexxla.org%2FNewsletter%2F9812safe.html>
 and 
<http://secure-web.cisco.com/1YOkF0HmSXzgkUjFJmn8yFhg2L09HrpgS0qAPaRvAUGL9PH3DMRW9K45clWzrW3ewTanQwrdKON0NcKzVyqjLzs0d5niuN5Wj3Wz8MHU971Gj4znrgmAATcjrWFQuA1kJt6A09GQttX8NMkRBn485myf2jYTkMEdH4Wi8xuhHqRIh3-zivudzlZAe3urnn9HJS_dAirVPwjrWMdNZKY23K2d0i77HzCdFFa2Bomro21ICQV5LodBCmW7FVOYvTEK9Mt6MKlkVZxG9bwOvl_233vbJ1fMWIxmy9wqXSdyBfeiAbPJI3BDNK-pVkTQXi1u435aytEI2WvKF5emDChP3q5DKBhScFJ5oDZeN8lMrLcbd4hAcHY!

  
nrtSS_rhn5jeu2S3924pgQlUz_wRvRDI4Yo6x5c15qLVoxg18D_XjKAA_W9IwcaxWHhc_lIcXL81Pt/http%3A%2F%2Fwww.rexxla.org%2FNewsletter%2F9901safe.html">
 has some tips on avoiding REXX pitfalls.

What's the point in managing something when you can just use a better
language? It's a good time to be working on z/OS as we have an abundance
of choice. That's not entirely obvious on this forum where every problem
seems to be met with a ham-fisted REXX solution.

Yes, Crayford's bashing REXX again. I have some experience of using z/OS
UNIX REXX services but I didn't find it productive. Maybe somebody with
more knowledge than me could post a snippet that demonstrates how to
recursively traverse a directory tree printing the entries.




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


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
David Crayford [dcrayf...@gmail.com]
Sent: Tuesday, June 28, 2022 11:31 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On 29/06/2022 5:42 am, Charles Mills wrote:

"write" fd "buf"

Which makes no sense to me at all. fd is passed by value but "buf" by name?

It's horribly inconsistent and unpleasant to use. The buffer HAS to be a
passed by reference (variable) as it could break REXX string length
limits or contain characters that REXX chokes on.
I can't help but think that you've made a rod for your back. REXX is
superficially simple but in my experience, which is 30 years of using
the language, it is anything but and has endless pitfalls.

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


--
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: Some questions on SYSCALL

2022-06-29 Thread Rony G. Flatscher

Hi David,

On 29.06.2022 15:54, David Crayford wrote:
I know ooRexx. I ported it to z/OS 10 years ago but it was buggy and slow. 


Hmm, ten years ago? Over time there has been so much improvements in these and other areas including 
a testing framework with quite a comprehensive coverage of the ooRexx interpreter.


There is zero chance of IBM or a vendor wasting resources on REXX today as there is no market for it. 


Hmm, so you speak for IBM? The REXX infrastructure, the REXX experts, the ability to learn REXX (and 
ooRexx for that matter) in a short time, becoming empowered to solve mainframe based problems 
quickly and the like does not constitute a USP (uinque selling proposition on the market)?



Now we have Python on z/OS REXX is very much a legacy language. That's even more pertinent with 
the shift from TSO/ISPF to IDEs.


Hmm, so Python is the end of the world as it solves everything? No other language stands a chance 
anymore?



I could be wrong and I'm willing to be turned. I'm a big fan of Lua which I consider to be the 
most elegant language I know. 


Sure, Lua - like many other languages following different paradigms - is an interesting language, 
but it could not be used to teach Business administration students programming from scratch within 
four months to the extent that in the end they would be able to program Windows, MSO, create 
complex, portable GUIs etc. on their own. It can be done with ooRexx (and the BSF4ooRexx function 
library bridging ooRexx and Java), believe it or not. As a result it is cheaper to learn ooRexx, and 
the problem solving capacity one gains with it quickly is really quite unparalleled.


Having REXX/ooRexx one is able to easily orchestrate and control other software. If need be one can 
bridge REXX/ooRexx easily with specialized software like database management systems (who would 
write one in REXX or Python for that matter) and the like.


In today's world I would deploy Java everywhere and exploit Java class libraries as much as possible 
from other languages, if need be. For the latter to be feasible you need a flexible, dynamical and 
easy to use language which is proven, which can be said of ooRexx with the ooRexx-Java bridge.



It can easily be used to write DSLs for configuration or model development. How do I write a DSL 
in REXX?


Why would I want to? Why not: "How do I write a DSL in C++?"



https://leafo.net/guides/dsl-in-lua.html


REXX is such an easy programming language that one does not need to create yet another language to 
make it usable. ;)


If really needed one could create DSLs with ooRexx  as with any other 
programming language, of course.

---rony




On 29/06/2022 9:41 pm, Rony G. Flatscher wrote:

Hi David,

On 29.06.2022 14:06, David Crayford wrote:

On 29/06/2022 6:37 pm, Seymour J Metz wrote:
Sme, but manageable. The article Safe REXX at  
and  has some tips on avoiding REXX pitfalls.


What's the point in managing something when you can just use a better language? It's a good time 
to be working on z/OS as we have an abundance of choice. That's not entirely obvious on this 
forum where every problem seems to be met with a ham-fisted REXX solution.


Yes, Crayford's bashing REXX again. I have some experience of using z/OS UNIX REXX services but 
I didn't find it productive. Maybe somebody with more knowledge than me could post a snippet 
that demonstrates how to recursively traverse a directory tree printing the entries.


The problem is that this is not constructive. Not sure why it is so important for you to bash 
REXX even if it makes you look bad at times.


REXX in the mainframe world (I learned REXX for the first time on a VM/CMS 370 system a few 
decades ago) is of course a great - and unmatched - productivity tool and as a result over the 
decades there has been an incredible amount of useful REXX inventory created.  Best, REXX is easy 
to learn and easy to use like no other language of that power.


If you were to know ooRexx you would realize that porting it to the mainframe would even help 
yourself and everyone else to settle on a few important languages and not being forced to go 
astray with this language for solving this particular problem, that language for solving that 
particular problem, and then suggesting to use yet another language for ...


Porting ooRexx to the mainframe would allow for keeping the existing REXX programs running with 
ooRexx (the design of ooRexx - by demand of IBM's customers - is such that it is compatible with 
classic REXX). Therefore one can use ooRexx to run existing REXX programs and one could use 
ooRexx to create new classic REXX programs.


Only then would one become able to take advantage of the many new ooRexx features like becoming 
able to fetch e.g. stems by reference,  or using ANSI REXX' "address...with" (e.g. redirecting 
input from stems or standard and error 

Re: Some questions on SYSCALL

2022-06-29 Thread Seymour J Metz
Have you stopped beating your wife? There is no agreement of what is a better 
language, much less a description of the context in which to evaluate "better".


From: IBM Mainframe Discussion List  on behalf of 
David Crayford 
Sent: Wednesday, June 29, 2022 8:06 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On 29/06/2022 6:37 pm, Seymour J Metz wrote:
> Sme, but manageable. The article Safe REXX at 
> <http://secure-web.cisco.com/18tXxLjz2q-nDjE3Fk3aQsvRJpFcP22D9GKeoWSbitPmfcGAttYHjb-kP18U8Ikl-aTGx-pwraxaebV32MLF29JU1T5PHRSawvmtcOGrlNGx7qinsWE4REjw9lBM0v-qPHaExEKTjFI5whqyzgNqyyP8lJXknHgVjB9cG81on4LMjV-ujVAqpW3I-PSQoBgSx1-68Dt9t0tiiiZC2mDbYmhMIfA34222KIpNnr3jIWqO2GmhJvocQ6YsZ4LFzMypLVDsEzR1jq2yHlrf-j3yNYMBOBBgbawlGvlwTlhcDmyj5VUWQPczUZkWLHAwKtz8DidQWTRQb3gMsJzKiE-WSx1GWdm6Q0IiDjs2_Omg4xTOuCBtUymaNKzQUCYdHr65JzHggOCeIsQlhDwHMCl30Fku0q_ApFl2GTV8nFoXiCad0H0PKU9S6UZqHhGLy0ZqE/http%3A%2F%2Fwww.rexxla.org%2FNewsletter%2F9812safe.html>
>  and 
> <http://secure-web.cisco.com/1YOkF0HmSXzgkUjFJmn8yFhg2L09HrpgS0qAPaRvAUGL9PH3DMRW9K45clWzrW3ewTanQwrdKON0NcKzVyqjLzs0d5niuN5Wj3Wz8MHU971Gj4znrgmAATcjrWFQuA1kJt6A09GQttX8NMkRBn485myf2jYTkMEdH4Wi8xuhHqRIh3-zivudzlZAe3urnn9HJS_dAirVPwjrWMdNZKY23K2d0i77HzCdFFa2Bomro21ICQV5LodBCmW7FVOYvTEK9Mt6MKlkVZxG9bwOvl_233vbJ1fMWIxmy9wqXSdyBfeiAbPJI3BDNK-pVkTQXi1u435aytEI2WvKF5emDChP3q5DKBhScFJ5oDZeN8lMrLcbd4hAcHY!
 
nrtSS_rhn5jeu2S3924pgQlUz_wRvRDI4Yo6x5c15qLVoxg18D_XjKAA_W9IwcaxWHhc_lIcXL81Pt/http%3A%2F%2Fwww.rexxla.org%2FNewsletter%2F9901safe.html">
 has some tips on avoiding REXX pitfalls.

What's the point in managing something when you can just use a better
language? It's a good time to be working on z/OS as we have an abundance
of choice. That's not entirely obvious on this forum where every problem
seems to be met with a ham-fisted REXX solution.

Yes, Crayford's bashing REXX again. I have some experience of using z/OS
UNIX REXX services but I didn't find it productive. Maybe somebody with
more knowledge than me could post a snippet that demonstrates how to
recursively traverse a directory tree printing the entries.



>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> 
> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
> David Crayford [dcrayf...@gmail.com]
> Sent: Tuesday, June 28, 2022 11:31 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Some questions on SYSCALL
>
> On 29/06/2022 5:42 am, Charles Mills wrote:
>> "write" fd "buf"
>>
>> Which makes no sense to me at all. fd is passed by value but "buf" by name?
> It's horribly inconsistent and unpleasant to use. The buffer HAS to be a
> passed by reference (variable) as it could break REXX string length
> limits or contain characters that REXX chokes on.
> I can't help but think that you've made a rod for your back. REXX is
> superficially simple but in my experience, which is 30 years of using
> the language, it is anything but and has endless pitfalls.
>
> --
> 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


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


Re: Some questions on SYSCALL

2022-06-29 Thread David Spiegel

Hi Bob,
When I programmed PL/I 40+ year ago, lining up the END; with the body 
was de rigeur. Initially, of course, that was using cards.
When ISPF (or XEDIT) came along, lining up the END: with DO/SELECT etc. 
made a lot more sense since excluded lines could be shown by column 
number containing DO/END/SELECT etc.

(This made debugging easier.)

Regards,
David

On 2022-06-29 10:07, Bob Bridges wrote:

You're kidding, right?  That convention isn't imposed by REXX, and as far as 
I've observed Lionel and I are two of only three people in the universe who 
prefer it.

(And don't you be knocking our convention.  Aligning the END with the rest of 
the paragraph is much more sensible than sticking it out in the wrong place, 
much easier to understand, as all right-thinking programmers understand - all 
three of us.)

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

/* Translating algorithms won't be really reliable for a while longer in a language in 
which we can say "time flies like an arrow; fruit flies like a banana". */

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
David Crayford
Sent: Wednesday, June 29, 2022 08:19

I really wish the "end" scope terminater would match the "do" column 
alignment. It's just another reason for me to hate on REXX when it's become common practice to uses 
bizarre formatting rules.

--- On 29/06/2022 8:12 pm, Lionel B. Dyck wrote:

x = bpxwunix('find /u/user/work/',,out.,err.) do I = 1 to out.0
 say out.i
 end

--
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: Some questions on SYSCALL

2022-06-29 Thread Seymour J Metz
Eternal theological debates:

 What is the best editor?

What is the best programming language?

What is the best scripting language?

What is the best naming convention?

What is the best indentation structure?

What is the best markup language?

I don't expect to ever see consensus on any of these.




From: IBM Mainframe Discussion List  on behalf of 
David Crayford 
Sent: Wednesday, June 29, 2022 8:32 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On 29/06/2022 8:27 pm, Lionel B. Dyck wrote:
> The formatting was a quick and dirty - I typically use the REXXFORM edit 
> macro to clean up alignments and keep things neat.

I'm not knocking your code Lionel. It's more the case that I don't like
what has become common formatting of REXX code blocks where the end is
indented at the end of the block. Is this REXX pretending to be Python
by obscuring the "end"?

if/do/ ...
...
   end



>
> You can find it at 
> https://secure-web.cisco.com/1g9tJ9-H12eczDi12_PT5ZboacQzwFJfBkV-6quaZ3XJ89TxMjglkr3pHnnDgjgPVoHsiW6eeNjfNJRmpXuTDCz32JZ84x94UymTmVolnLtUjhrM0If48sQ1jiAaKWlrYBL72h3qSAX4Eh57jBaqSodmt55xYoxrUiBl4BLQOot4N5TKEJ693J3Y4arn2kp2bu7CgPrQlNPgLLx6AFccUGyjND8CMAF4rDpYv0O0BKsUhuQg13sKwBeZGUcY4mMzDDtkiLLuUY9OeqpyN3QdSLfGX3bN7h3pTgC8aiDX0UV2zDVWE3Q7YIMQcc7LKwwDK6jvKccZyOuABGKC1SY-GPlUCUgyXicMXkk4NUv_xkWVYZqiP2gLRGuEtkfP5Wucz91FAWIdrpE4T72FN1iVRhed3U0iR3V_r3F-zAQbEuRmvgm2ThFkgSzPdFpNw5N-k/https%3A%2F%2Fgithub.com%2Flbdyck%2Frexxform
>  - I ported it from z/VM to work as an edit macro.
>
> Yes - you could use SYSCALLS and get the same info but this was a quick and 
> easy answer
>
> Enjoy
>
> Lionel B. Dyck <><
> Website: 
> https://secure-web.cisco.com/1aNt8pJ83MNEQ1NtSHr3Y72x8EWzbmI9xzFcAVBDj44gJ7ox2xy14AOdyASS_1M2DoQl_kTtewjoWtBEXko8oaqvU-9yoJAxfLCc-4hAE7gjap4NmDMB8OOGnNhnFKDA2ClgkUIl2CRpMtTLuJ5QKNhbfV6b1SVKQ4hf_zvRAbTZGAfEWlIX5pyJgchTrOsHNcztlOMWCC4yg-ZG__627w2yiPnXs8gCKenifgsmJ253MqfoTH6McyE1_G8Z72hRQKNnjs3wTdWRxGAz6g5yZ86vL7lP1UhfRnz5ZiraTxtR1HzvAQq-fy60AdPR33V0A21E9LSohJi83YHrhutHWUEJQc15gjEDAI3rbZgwikZC_3g5wfT2spqrr_Ho4KonYuPYY-Ad1RIabboN7dM9v1efoKbM2CUCy6WJlY7ZHEhUbhKEB0tSWWDXtx3r7Pqxr/https%3A%2F%2Fwww.lbdsoftware.com
> Github: 
> https://secure-web.cisco.com/1OixksXKLve8NJ19OczrvaLipWI-lIbn-FtN_salcVl5PGkdMnuluYZ828-2Zh-EBm2ESF_D7NVNyJohR094PGZ-rmYLeOqehTJ1ZJcmAsN4AMTsYW6JAGpYKG92XhCk-FOf9Yf1_UCIohGgGnuG246i6ISZ1VvNSpN2va4p_EQjY2x51MRS9RcymuQcYkNqWIWxbUk9NvzdMFLdgJdQXyKf6I1bxgNygfrvxKuFt6OuwZ2pIgTE1sc_Np2jSa6LFtoj6GV0AvQX02Z9J3R9e35OWgZDkcQPwGyTqcl7w2d5YEIsNOxrT93N1APsv5NOq3vA2CmAmVcmHQePBuMe6aIvS9JrXkqamJyQ_xZmb7p_EdMlsgp85Wxx1bwkerm_zDBwXiOacATKPM00BvkeGP1tBZ8glkiHlp6-BZl67g33O0aWIY8TnzwV6hudx09nf/https%3A%2F%2Fgithub.com%2Flbdyck
>
> “Worry more about your character than your reputation. Character is what you 
> are, reputation merely what others think you are.”   - - - John Wooden
>
> -Original Message-
> From: IBM Mainframe Discussion List  On Behalf Of 
> David Crayford
> Sent: Wednesday, June 29, 2022 07:19 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Some questions on SYSCALL
>
> Thanks Lionel. If I want to get the directory entry I suppose I have to also 
> execute bpxwunix("ls ") or use SYSCALLS?
>
> BTW, I really wish the "end" scope terminater would match the "do"
> column alignment. It's just another reason for me to hate on REXX when it's 
> become common practice to uses bizarre formatting rules.
>
> On 29/06/2022 8:12 pm, Lionel B. Dyck wrote:
>> Perhaps something like this will give you what you want to recursively 
>> traverse a directory:
>>
>> x = bpxwunix('find /u/user/work/',,out.,err.) do I = 1 to out.0
>>  say out.i
>>  end
>>
>>
>> Lionel B. Dyck <><
>> Website: 
>> https://secure-web.cisco.com/1aNt8pJ83MNEQ1NtSHr3Y72x8EWzbmI9xzFcAVBDj44gJ7ox2xy14AOdyASS_1M2DoQl_kTtewjoWtBEXko8oaqvU-9yoJAxfLCc-4hAE7gjap4NmDMB8OOGnNhnFKDA2ClgkUIl2CRpMtTLuJ5QKNhbfV6b1SVKQ4hf_zvRAbTZGAfEWlIX5pyJgchTrOsHNcztlOMWCC4yg-ZG__627w2yiPnXs8gCKenifgsmJ253MqfoTH6McyE1_G8Z72hRQKNnjs3wTdWRxGAz6g5yZ86vL7lP1UhfRnz5ZiraTxtR1HzvAQq-fy60AdPR33V0A21E9LSohJi83YHrhutHWUEJQc15gjEDAI3rbZgwikZC_3g5wfT2spqrr_Ho4KonYuPYY-Ad1RIabboN7dM9v1efoKbM2CUCy6WJlY7ZHEhUbhKEB0tSWWDXtx3r7Pqxr/https%3A%2F%2Fwww.lbdsoftware.com
>> Github: 
>> https://secure-web.cisco.com/1OixksXKLve8NJ19OczrvaLipWI-lIbn-FtN_salcVl5PGkdMnuluYZ828-2Zh-EBm2ESF_D7NVNyJohR094PGZ-rmYLeOqehTJ1ZJcmAsN4AMTsYW6JAGpYKG92XhCk-FOf9Yf1_UCIohGgGnuG246i6ISZ1VvNSpN2va4p_EQjY2x51MRS9RcymuQcYkNqWIWxbUk9NvzdMFLdgJdQXyKf6I1bxgNygfrvxKuFt6OuwZ2pIgTE1sc_Np2jSa6LFtoj6GV0AvQX02Z9J3R9e35OWgZDkcQPwGyTqcl7w2d5YEIsNOxrT93N1APsv5NOq3vA2CmAmVcmHQePBuMe6aIvS9JrXkqamJyQ_xZmb7p_EdMlsgp85Wxx1bwkerm_zDBwXiOacATKPM00BvkeGP1tBZ8glkiHl

Re: Some questions on SYSCALL

2022-06-29 Thread Bob Bridges
 Some years ago I accidentally left a book at church.  I was pretty
sure I knew where it was, so I figured I'd just pick it up the next time I
was in that part of the building.  But a friend returned it to me before I
got around to it.

I usually put my name in my books, but I hadn't in this one yet so I asked
him how he knew it was mine.  "Well, I wasn't sure", he said, "but I noticed
that on page 37 someone had crossed out the word 'criteria' and written...".

My sister loves that story.

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

/* Influence is not to be confused with corruption. Influence can get you to
the head of the line to get your driver's license; corruption is when you
fail the test but get the license anyway.  -William F Buckley, 2004-09-17 */

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of
Paul Gilmartin
Sent: Wednesday, June 29, 2022 09:20

The singular is "criterion".

--- On Jun 29, 2022, at 07:02:39, David Crayford wrote:
> That doesn't eliminate confusion at all. If you have a large loop and you
don't understand your code then your code is crap. Any decent code editor
will match blocks on key-press. ISPF doesn't meet that criteria!

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


Re: Some questions on SYSCALL

2022-06-29 Thread Bob Bridges
You're kidding, right?  That convention isn't imposed by REXX, and as far as 
I've observed Lionel and I are two of only three people in the universe who 
prefer it.

(And don't you be knocking our convention.  Aligning the END with the rest of 
the paragraph is much more sensible than sticking it out in the wrong place, 
much easier to understand, as all right-thinking programmers understand - all 
three of us.)

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

/* Translating algorithms won't be really reliable for a while longer in a 
language in which we can say "time flies like an arrow; fruit flies like a 
banana". */

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
David Crayford
Sent: Wednesday, June 29, 2022 08:19

I really wish the "end" scope terminater would match the "do" column 
alignment. It's just another reason for me to hate on REXX when it's become 
common practice to uses bizarre formatting rules.

--- On 29/06/2022 8:12 pm, Lionel B. Dyck wrote:
> x = bpxwunix('find /u/user/work/',,out.,err.) do I = 1 to out.0
> say out.i
> end

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


Re: Some questions on SYSCALL

2022-06-29 Thread David Crayford

Hi Rony,

I know ooRexx. I ported it to z/OS 10 years ago but it was buggy and 
slow. There is zero chance of IBM or a vendor wasting resources on REXX 
today as there is no market for it. Now we have Python on z/OS REXX is 
very much a legacy language. That's even more pertinent with the shift 
from TSO/ISPF to IDEs.


I could be wrong and I'm willing to be turned. I'm a big fan of Lua 
which I consider to be the most elegant language I know. It can easily 
be used to write DSLs for configuration or model development. How do I 
write a DSL in REXX?


https://leafo.net/guides/dsl-in-lua.html

On 29/06/2022 9:41 pm, Rony G. Flatscher wrote:

Hi David,

On 29.06.2022 14:06, David Crayford wrote:

On 29/06/2022 6:37 pm, Seymour J Metz wrote:
Sme, but manageable. The article Safe REXX at 
 and 
 has some tips on 
avoiding REXX pitfalls.


What's the point in managing something when you can just use a better 
language? It's a good time to be working on z/OS as we have an 
abundance of choice. That's not entirely obvious on this forum where 
every problem seems to be met with a ham-fisted REXX solution.


Yes, Crayford's bashing REXX again. I have some experience of using 
z/OS UNIX REXX services but I didn't find it productive. Maybe 
somebody with more knowledge than me could post a snippet that 
demonstrates how to recursively traverse a directory tree printing 
the entries.


The problem is that this is not constructive. Not sure why it is so 
important for you to bash REXX even if it makes you look bad at times.


REXX in the mainframe world (I learned REXX for the first time on a 
VM/CMS 370 system a few decades ago) is of course a great - and 
unmatched - productivity tool and as a result over the decades there 
has been an incredible amount of useful REXX inventory created.  Best, 
REXX is easy to learn and easy to use like no other language of that 
power.


If you were to know ooRexx you would realize that porting it to the 
mainframe would even help yourself and everyone else to settle on a 
few important languages and not being forced to go astray with this 
language for solving this particular problem, that language for 
solving that particular problem, and then suggesting to use yet 
another language for ...


Porting ooRexx to the mainframe would allow for keeping the existing 
REXX programs running with ooRexx (the design of ooRexx - by demand of 
IBM's customers - is such that it is compatible with classic REXX). 
Therefore one can use ooRexx to run existing REXX programs and one 
could use ooRexx to create new classic REXX programs.


Only then would one become able to take advantage of the many new 
ooRexx features like becoming able to fetch e.g. stems by reference,  
or using ANSI REXX' "address...with" (e.g. redirecting input from 
stems or standard and error output to stems), being able to create 
public Rexx routines (can be directly called from another REXX 
program) and much more.


Doing so would be sensible as it allows for exploiting the already 
known programming language, its environment and existing REXX 
infrastructure; one would gain new abilities and options from then on.


Also the important property - being able to learn and understand the 
language quickly - remains intact with ooRexx, it just increases the 
problem solution capacity dramatically by embracing the 
object-oriented paradigm the way it does.


If Business administration students are able to learn ooRexx from 
scratch in just four months such that in the end they have become able 
to create programs for Windows and Microsoft Office (after only two 
months) and portable (running unchanged on Windows, Linux and MacOS) 
applications including OpenOffice/LibreOffice and even JavaFX (!) GUIs 
(after another two months, exploiting all of Java which gets 
camouflaged as the dynamically typed, caseless ooRexx, without having 
to learn a single line of Java; one only needs to be able to read and 
understand the JavaDocs).


So it is feasible and not expensive at all to teach newcomers to 
program in ooRexx. Putting ooRexx into the hands of REXXperts like the 
ones that can be found here, would be a real and important boon ...


As IBM has been successfully porting quite a few programming languages 
to the mainframe, it should be feasible to port ooRexx as well as 
ooRexx is purely implemented in C++ (it has in addition a very nice 
and powerful native API to the interpreter) making a modern and 
powerful incarnation of REXX available on the mainframe where REXX was 
born ...


---rony

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


--
For IBM-MAIN subscribe / signoff / archive access instructions,

Re: Some questions on SYSCALL

2022-06-29 Thread Bob Bridges
I'm not Dale, but actually I do.  I use it because sometimes it's necessary to 
help me set a variable whose name is itself variable, and it's wonderful then.  
But otherwise I don't have much use for it, for exactly that reason.

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

/* How often we look upon God as our last and feeblest resource!  We go to Him 
because we have nowhere else to go.  And then we learn that the storms of life 
have driven us, not upon the rocks, but into the desired haven.  -George 
Macdonald */

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Paul Gilmartin
Sent: Tuesday, June 28, 2022 18:30

Side effect.  Do you similarly dislike
X = value( Y, Z )

--- On Tue, 28 Jun 2022 17:05:40 -0500, Dale R. Smith wrote:
>I sometimes use the "If Function(arg1,arg2...)"I don't like it for 
>SYSCALLS because it's not obvious that "If SYSCALLS('ON')" is not just testing 
>the returned value, but it also establishes the SYSCALL environment.

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


Re: Some questions on SYSCALL

2022-06-29 Thread Lennie Dymoke-Bradshaw
Happy retirement Bill!
Lennie

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Bill Schoen
Sent: 29 June 2022 13:48
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

There are quite a few topics in this thread, some well addressed, some maybe 
not, but I'll pitch in...

re: syscalls environment should be integrated into rexx this is included in the 
default environments for rexx running in mvs (irxjcl), tso, and ispf calling 
syscalls('ON') is not required to use address syscall all that does is define 
the syscall variables The only reason I can imagine if you get errors if not 
using syscalls() is you probably have replacements for the default environments 
that were probably made a long time ago and do not include syscall.

re: syscalls('ON') and return code
used as above is a function call which does return a return code.
if you don't assign that to a variable or use it in an expression or use call, 
the rexx processor will execute the return code in the current address 
environment as a command

re: syscalls('OFF')
this causes your process to undub which is typically unnecessary and often 
results in confusion

re: write buffer is a variable name
This was done for a variety of reasons, but primarily, rexx has a limit to 
number of parameters that can be passed to an address environment.
I think TSO rexx limits it to 20.  If it took a string you would be limited to 
very few blank delimited words.
a number of syscall commands take variable/stem names to avoid issues with 
input or output rexx restrictions.
.
Probably my last post before retirement tomorrow.
Bill Schoen

--
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: Some questions on SYSCALL

2022-06-29 Thread Rony G. Flatscher

Hi David,

On 29.06.2022 14:06, David Crayford wrote:

On 29/06/2022 6:37 pm, Seymour J Metz wrote:
Sme, but manageable. The article Safe REXX at  
and  has some tips on avoiding REXX pitfalls.


What's the point in managing something when you can just use a better language? It's a good time 
to be working on z/OS as we have an abundance of choice. That's not entirely obvious on this forum 
where every problem seems to be met with a ham-fisted REXX solution.


Yes, Crayford's bashing REXX again. I have some experience of using z/OS UNIX REXX services but I 
didn't find it productive. Maybe somebody with more knowledge than me could post a snippet that 
demonstrates how to recursively traverse a directory tree printing the entries.


The problem is that this is not constructive. Not sure why it is so important for you to bash REXX 
even if it makes you look bad at times.


REXX in the mainframe world (I learned REXX for the first time on a VM/CMS 370 system a few decades 
ago) is of course a great - and unmatched - productivity tool and as a result over the decades there 
has been an incredible amount of useful REXX inventory created.  Best, REXX is easy to learn and 
easy to use like no other language of that power.


If you were to know ooRexx you would realize that porting it to the mainframe would even help 
yourself and everyone else to settle on a few important languages and not being forced to go astray 
with this language for solving this particular problem, that language for solving that particular 
problem, and then suggesting to use yet another language for ...


Porting ooRexx to the mainframe would allow for keeping the existing REXX programs running with 
ooRexx (the design of ooRexx - by demand of IBM's customers - is such that it is compatible with 
classic REXX). Therefore one can use ooRexx to run existing REXX programs and one could use ooRexx 
to create new classic REXX programs.


Only then would one become able to take advantage of the many new ooRexx features like becoming able 
to fetch e.g. stems by reference,  or using ANSI REXX' "address...with" (e.g. redirecting input from 
stems or standard and error output to stems), being able to create public Rexx routines (can be 
directly called from another REXX program) and much more.


Doing so would be sensible as it allows for exploiting the already known programming language, its 
environment and existing REXX infrastructure; one would gain new abilities and options from then on.


Also the important property - being able to learn and understand the language quickly - remains 
intact with ooRexx, it just increases the problem solution capacity dramatically by embracing the 
object-oriented paradigm the way it does.


If Business administration students are able to learn ooRexx from scratch in just four months such 
that in the end they have become able to create programs for Windows and Microsoft Office (after 
only two months) and portable (running unchanged on Windows, Linux and MacOS) applications including 
OpenOffice/LibreOffice and even JavaFX (!) GUIs (after another two months, exploiting all of Java 
which gets camouflaged as the dynamically typed, caseless ooRexx, without having to learn a single 
line of Java; one only needs to be able to read and understand the JavaDocs).


So it is feasible and not expensive at all to teach newcomers to program in ooRexx. Putting ooRexx 
into the hands of REXXperts like the ones that can be found here, would be a real and important boon ...


As IBM has been successfully porting quite a few programming languages to the mainframe, it should 
be feasible to port ooRexx as well as ooRexx is purely implemented in C++ (it has in addition a very 
nice and powerful native API to the interpreter) making a modern and powerful incarnation of REXX 
available on the mainframe where REXX was born ...


---rony

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


Re: Some questions on SYSCALL

2022-06-29 Thread Seymour J Metz
Why don't you speak for yourself? When I saw a van with the license  number 
PEDANT, I was jealous.


From: IBM Mainframe Discussion List  on behalf of 
David Crayford 
Sent: Wednesday, June 29, 2022 9:34 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On 29/06/2022 9:20 pm, Paul Gilmartin wrote:
> On Jun 29, 2022, at 07:02:39, David Crayford wrote:
>>  ...
>> That doesn't eliminate confusion at all. If you have a large loop and you 
>> don't understand your code then your code is crap. Any decent code editor 
>> will match blocks on key-press. ISPF doesn't meet that criteria!
>>
> The singular is "criterion".
Who cares? Nobody likes a nitpicker!

--
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: Some questions on SYSCALL

2022-06-29 Thread David Crayford

On 29/06/2022 9:20 pm, Paul Gilmartin wrote:

On Jun 29, 2022, at 07:02:39, David Crayford wrote:

 ...
That doesn't eliminate confusion at all. If you have a large loop and you don't 
understand your code then your code is crap. Any decent code editor will match 
blocks on key-press. ISPF doesn't meet that criteria!
   

The singular is "criterion".

Who cares? Nobody likes a nitpicker!

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


Re: Some questions on SYSCALL

2022-06-29 Thread Paul Gilmartin
On Jun 29, 2022, at 07:02:39, David Crayford wrote:
> ...
> That doesn't eliminate confusion at all. If you have a large loop and you 
> don't understand your code then your code is crap. Any decent code editor 
> will match blocks on key-press. ISPF doesn't meet that criteria!
>   
The singular is "criterion".

-- 
gil

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


Re: Some questions on SYSCALL

2022-06-29 Thread David Crayford

On 29/06/2022 8:48 pm, Paul Gilmartin wrote:

On Jun 29, 2022, at 06:37:39, Lionel B. Dyck  wrote:

Some align the end with the do, others align the end with the code in the do 
structure.  The key is a consistent style for readability.

The REXXFORM results of my example are:

/* rexx */
x = bpxwunix('find /u/user/work/',,out.,err.)
do I = 1 to out.0
  say out.i
end


For any large loop, I cite the control variable on the "end" to eliminate 
confusion:
x = bpxwunix('find /u/user/work/',,out.,err.)
do I = 1 to out.0
  say out.i
  end I
That doesn't eliminate confusion at all. If you have a large loop and 
you don't understand your code then your code is crap. Any decent code 
editor will match blocks on key-press. ISPF doesn't meet that criteria!


At times I use an otherwise otiose control variable:
do ThisLoop = 1 until1
...
end ThisLoop

(I wish JCL would require that the name fields on IF, ELSE, and THEN match.)



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


Re: Some questions on SYSCALL

2022-06-29 Thread David Crayford

Thanks David, I learned something there that I didn't know.

Cheers

On 29/06/2022 8:50 pm, David Spiegel wrote:

Hi David,
The paragraphing style was used historically by PL/I.
Rexx syntactically is a PL/I derivative,

Regards,
David

On 2022-06-29 08:32, David Crayford wrote:

On 29/06/2022 8:27 pm, Lionel B. Dyck wrote:
The formatting was a quick and dirty - I typically use the REXXFORM 
edit macro to clean up alignments and keep things neat.


I'm not knocking your code Lionel. It's more the case that I don't 
like what has become common formatting of REXX code blocks where the 
end is indented at the end of the block. Is this REXX pretending to 
be Python by obscuring the "end"?


if/do/ ...
   ...
  end





You can find it at 
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Flbdyck%2Frexxformdata=05%7C01%7C%7C5089dfbaebb94b75f35608da59cb755a%7C84df9e7fe9f640afb435%7C1%7C0%7C637921027658728053%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=cI7TAAxlEwrGdv0%2Fe1UpsovUWwTUmwz4t8Bu23vlU%2Bs%3Dreserved=0 
- I ported it from z/VM to work as an edit macro.


Yes - you could use SYSCALLS and get the same info but this was a 
quick and easy answer


Enjoy

Lionel B. Dyck <><
Website: 
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.lbdsoftware.com%2Fdata=05%7C01%7C%7C5089dfbaebb94b75f35608da59cb755a%7C84df9e7fe9f640afb435%7C1%7C0%7C637921027658728053%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=Gelj38NYPjDxFTVCMUlrezI6EsHtG%2FeSqi12EH5K%2BMw%3Dreserved=0
Github: 
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Flbdyckdata=05%7C01%7C%7C5089dfbaebb94b75f35608da59cb755a%7C84df9e7fe9f640afb435%7C1%7C0%7C637921027658728053%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=onLvqMQf4nDO2IFcEuP7zNjXtuR9YkytAMwgam1NDdI%3Dreserved=0


“Worry more about your character than your reputation. Character is 
what you are, reputation merely what others think you are.” - - - 
John Wooden


-Original Message-
From: IBM Mainframe Discussion List  On 
Behalf Of David Crayford

Sent: Wednesday, June 29, 2022 07:19 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

Thanks Lionel. If I want to get the directory entry I suppose I have 
to also execute bpxwunix("ls ") or use SYSCALLS?


BTW, I really wish the "end" scope terminater would match the "do"
column alignment. It's just another reason for me to hate on REXX 
when it's become common practice to uses bizarre formatting rules.


On 29/06/2022 8:12 pm, Lionel B. Dyck wrote:
Perhaps something like this will give you what you want to 
recursively traverse a directory:


x = bpxwunix('find /u/user/work/',,out.,err.) do I = 1 to out.0
 say out.i
 end


Lionel B. Dyck <><
Website: 
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.lbdsoftware.com%2Fdata=05%7C01%7C%7C5089dfbaebb94b75f35608da59cb755a%7C84df9e7fe9f640afb435%7C1%7C0%7C637921027658728053%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=Gelj38NYPjDxFTVCMUlrezI6EsHtG%2FeSqi12EH5K%2BMw%3Dreserved=0
Github: 
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Flbdyckdata=05%7C01%7C%7C5089dfbaebb94b75f35608da59cb755a%7C84df9e7fe9f640afb435%7C1%7C0%7C637921027658728053%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=onLvqMQf4nDO2IFcEuP7zNjXtuR9YkytAMwgam1NDdI%3Dreserved=0


“Worry more about your character than your reputation. Character is 
what you are, reputation merely what others think you are.”   - - - 
John Wooden


-Original Message-
From: IBM Mainframe Discussion List  On 
Behalf Of David Crayford

Sent: Wednesday, June 29, 2022 07:07 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On 29/06/2022 6:37 pm, Seymour J Metz wrote:
Sme, but manageable. The article Safe REXX at 
<https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.rexxla.org%2FNewsletter%2F9812safe.htmldata=05%7C01%7C%7C5089dfbaebb94b75f35608da59cb755a%7C84df9e7fe9f640afb435%7C1%7C0%7C637921027658728053%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=0WyZp%2BqUZZa1cXYzA8gaMa881zHH96lf2UbUhonNCuM%3Dreserved=0> 
and 
<https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.rexxla.org%2FNewsletter%2F9901safe.htmldata=05%7C01%7C%7C5089dfbaebb94b75f35608da59cb755a%7C84df9e7fe9f640afb435%7C1%7C0%7C637921027658728053%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7

Re: Some questions on SYSCALL

2022-06-29 Thread Paul Gilmartin
On Jun 29, 2022, at 05:56:50, Seymour J Metz  wrote:
> 
> Passing the buffer by value would cause the parameters of write to be 
> inconsistent with the parameters of read. IMHO, making them consistent is 
> intuitive.
>  
Both are by name.  I was incorrect earlier.
 -Original Message-
> From: Paul Gilmartin
> Sent: Tuesday, June 28, 2022 3:01 PM
> 
> Both by value.
>string = "Hello world"ESC_N
>address SYSCALL "write 1 (string)"

-- 
gil

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


Re: Some questions on SYSCALL

2022-06-29 Thread David Spiegel

Hi David,
The paragraphing style was used historically by PL/I.
Rexx syntactically is a PL/I derivative,

Regards,
David

On 2022-06-29 08:32, David Crayford wrote:

On 29/06/2022 8:27 pm, Lionel B. Dyck wrote:
The formatting was a quick and dirty - I typically use the REXXFORM 
edit macro to clean up alignments and keep things neat.


I'm not knocking your code Lionel. It's more the case that I don't 
like what has become common formatting of REXX code blocks where the 
end is indented at the end of the block. Is this REXX pretending to be 
Python by obscuring the "end"?


if/do/ ...
   ...
  end





You can find it at 
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Flbdyck%2Frexxformdata=05%7C01%7C%7C5089dfbaebb94b75f35608da59cb755a%7C84df9e7fe9f640afb435%7C1%7C0%7C637921027658728053%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=cI7TAAxlEwrGdv0%2Fe1UpsovUWwTUmwz4t8Bu23vlU%2Bs%3Dreserved=0 
- I ported it from z/VM to work as an edit macro.


Yes - you could use SYSCALLS and get the same info but this was a 
quick and easy answer


Enjoy

Lionel B. Dyck <><
Website: 
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.lbdsoftware.com%2Fdata=05%7C01%7C%7C5089dfbaebb94b75f35608da59cb755a%7C84df9e7fe9f640afb435%7C1%7C0%7C637921027658728053%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=Gelj38NYPjDxFTVCMUlrezI6EsHtG%2FeSqi12EH5K%2BMw%3Dreserved=0
Github: 
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Flbdyckdata=05%7C01%7C%7C5089dfbaebb94b75f35608da59cb755a%7C84df9e7fe9f640afb435%7C1%7C0%7C637921027658728053%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=onLvqMQf4nDO2IFcEuP7zNjXtuR9YkytAMwgam1NDdI%3Dreserved=0


“Worry more about your character than your reputation. Character is 
what you are, reputation merely what others think you are.” - - - 
John Wooden


-Original Message-
From: IBM Mainframe Discussion List  On 
Behalf Of David Crayford

Sent: Wednesday, June 29, 2022 07:19 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

Thanks Lionel. If I want to get the directory entry I suppose I have 
to also execute bpxwunix("ls ") or use SYSCALLS?


BTW, I really wish the "end" scope terminater would match the "do"
column alignment. It's just another reason for me to hate on REXX 
when it's become common practice to uses bizarre formatting rules.


On 29/06/2022 8:12 pm, Lionel B. Dyck wrote:
Perhaps something like this will give you what you want to 
recursively traverse a directory:


x = bpxwunix('find /u/user/work/',,out.,err.) do I = 1 to out.0
 say out.i
 end


Lionel B. Dyck <><
Website: 
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.lbdsoftware.com%2Fdata=05%7C01%7C%7C5089dfbaebb94b75f35608da59cb755a%7C84df9e7fe9f640afb435%7C1%7C0%7C637921027658728053%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=Gelj38NYPjDxFTVCMUlrezI6EsHtG%2FeSqi12EH5K%2BMw%3Dreserved=0
Github: 
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Flbdyckdata=05%7C01%7C%7C5089dfbaebb94b75f35608da59cb755a%7C84df9e7fe9f640afb435%7C1%7C0%7C637921027658728053%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=onLvqMQf4nDO2IFcEuP7zNjXtuR9YkytAMwgam1NDdI%3Dreserved=0


“Worry more about your character than your reputation. Character is 
what you are, reputation merely what others think you are.”   - - - 
John Wooden


-Original Message-
From: IBM Mainframe Discussion List  On 
Behalf Of David Crayford

Sent: Wednesday, June 29, 2022 07:07 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On 29/06/2022 6:37 pm, Seymour J Metz wrote:
Sme, but manageable. The article Safe REXX at 
<https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.rexxla.org%2FNewsletter%2F9812safe.htmldata=05%7C01%7C%7C5089dfbaebb94b75f35608da59cb755a%7C84df9e7fe9f640afb435%7C1%7C0%7C637921027658728053%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=0WyZp%2BqUZZa1cXYzA8gaMa881zHH96lf2UbUhonNCuM%3Dreserved=0> 
and 
<https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.rexxla.org%2FNewsletter%2F9901safe.htmldata=05%7C01%7C%7C5089dfbaebb94b75f35608da59cb755a%7C84df9e7fe9f640afb435%7C1%7C0%7C637921027658728053%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=nT5fYZ4eGdkfNIYDPM35adjNN3JQUBJJpfm2kFN8KJQ%3Dreserved=0;> 
has some tips on avoiding REXX 

Re: Some questions on SYSCALL

2022-06-29 Thread Bill Schoen
There are quite a few topics in this thread, some well addressed, some maybe 
not, but I'll pitch in...

re: syscalls environment should be integrated into rexx
this is included in the default environments for rexx running in mvs (irxjcl), 
tso, and ispf
calling syscalls('ON') is not required to use address syscall
all that does is define the syscall variables
The only reason I can imagine if you get errors if not using syscalls() is you 
probably have replacements for the default environments that were probably made 
a long time ago and do not include syscall.

re: syscalls('ON') and return code
used as above is a function call which does return a return code.
if you don't assign that to a variable or use it in an expression or use call, 
the rexx processor will execute the return code in the current address 
environment as a command

re: syscalls('OFF')
this causes your process to undub which is typically unnecessary and often 
results in confusion

re: write buffer is a variable name
This was done for a variety of reasons, but primarily, rexx has a limit to 
number of parameters that can be passed to an address environment.
I think TSO rexx limits it to 20.  If it took a string you would be limited to 
very few blank delimited words.
a number of syscall commands take variable/stem names to avoid issues with 
input or output rexx restrictions.
.
Probably my last post before retirement tomorrow.
Bill Schoen

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


Re: Some questions on SYSCALL

2022-06-29 Thread Paul Gilmartin
On Jun 29, 2022, at 06:37:39, Lionel B. Dyck  wrote:
> 
> Some align the end with the do, others align the end with the code in the do 
> structure.  The key is a consistent style for readability.
> 
> The REXXFORM results of my example are:
> 
> /* rexx */   
> x = bpxwunix('find /u/user/work/',,out.,err.)
> do I = 1 to out.0
>  say out.i  
> end  
> 
For any large loop, I cite the control variable on the "end" to eliminate 
confusion:
   x = bpxwunix('find /u/user/work/',,out.,err.)
   do I = 1 to out.0
 say out.i
 end I

At times I use an otherwise otiose control variable:
   do ThisLoop = 1 until1
   ...
   end ThisLoop

(I wish JCL would require that the name fields on IF, ELSE, and THEN match.)

-- 
gil

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


Re: Some questions on SYSCALL

2022-06-29 Thread David Crayford

On 29/06/2022 8:37 pm, Lionel B. Dyck wrote:

Some align the end with the do, others align the end with the code in the do 
structure.  The key is a consistent style for readability.

The REXXFORM results of my example are:

/* rexx */
  x = bpxwunix('find /u/user/work/',,out.,err.)
  do I = 1 to out.0
say out.i
  end


Your example returns the file path and you still need to parse the 
results and call additional code to get directory entry information. 
It's much easier to just use C++ which is at the same level of 
abstraction and orders of magnitude more powerful.


    for (auto& dirEntry: 
std::filesystem::recursive_directory_iterator(path)) {

    if (!dirEntry.is_regular_file()) {
    std::cout << "Directory: " << dirEntry.path() << std::endl;
    continue;
    }
    std::filesystem::path file = dirEntry.path();
    std::cout << "Filename: " << file.filename() << " extension: " 
<< file.extension() << std::endl;

    }




Lionel B. Dyck <><
Website: https://www.lbdsoftware.com
Github: https://github.com/lbdyck

“Worry more about your character than your reputation. Character is what you 
are, reputation merely what others think you are.”   - - - John Wooden

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
David Crayford
Sent: Wednesday, June 29, 2022 07:32 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On 29/06/2022 8:27 pm, Lionel B. Dyck wrote:

The formatting was a quick and dirty - I typically use the REXXFORM edit macro 
to clean up alignments and keep things neat.

I'm not knocking your code Lionel. It's more the case that I don't like what has become 
common formatting of REXX code blocks where the end is indented at the end of the block. 
Is this REXX pretending to be Python by obscuring the "end"?

if/do/ ...
 ...
end




You can find it at https://github.com/lbdyck/rexxform - I ported it from z/VM 
to work as an edit macro.

Yes - you could use SYSCALLS and get the same info but this was a
quick and easy answer

Enjoy

Lionel B. Dyck <><
Website: https://www.lbdsoftware.com
Github: https://github.com/lbdyck

“Worry more about your character than your reputation. Character is what you 
are, reputation merely what others think you are.”   - - - John Wooden

-Original Message-
From: IBM Mainframe Discussion List  On
Behalf Of David Crayford
Sent: Wednesday, June 29, 2022 07:19 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

Thanks Lionel. If I want to get the directory entry I suppose I have to also execute 
bpxwunix("ls ") or use SYSCALLS?

BTW, I really wish the "end" scope terminater would match the "do"
column alignment. It's just another reason for me to hate on REXX when it's 
become common practice to uses bizarre formatting rules.

On 29/06/2022 8:12 pm, Lionel B. Dyck wrote:

Perhaps something like this will give you what you want to recursively traverse 
a directory:

x = bpxwunix('find /u/user/work/',,out.,err.) do I = 1 to out.0
  say out.i
  end


Lionel B. Dyck <><
Website: https://www.lbdsoftware.com
Github: https://github.com/lbdyck

“Worry more about your character than your reputation. Character is what you 
are, reputation merely what others think you are.”   - - - John Wooden

-Original Message-
From: IBM Mainframe Discussion List  On
Behalf Of David Crayford
Sent: Wednesday, June 29, 2022 07:07 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On 29/06/2022 6:37 pm, Seymour J Metz wrote:

Sme, but manageable. The article Safe REXX at 
<http://www.rexxla.org/Newsletter/9812safe.html> and 
<http://www.rexxla.org/Newsletter/9901safe.html;> has some tips on avoiding REXX 
pitfalls.

What's the point in managing something when you can just use a better language? 
It's a good time to be working on z/OS as we have an abundance of choice. 
That's not entirely obvious on this forum where every problem seems to be met 
with a ham-fisted REXX solution.

Yes, Crayford's bashing REXX again. I have some experience of using z/OS UNIX 
REXX services but I didn't find it productive. Maybe somebody with more 
knowledge than me could post a snippet that demonstrates how to recursively 
traverse a directory tree printing the entries.




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


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on
behalf of David Crayford [dcrayf...@gmail.com]
Sent: Tuesday, June 28, 2022 11:31 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On 29/06/2022 5:42 am, Charles Mills wrote:

"write" fd "buf"

Which makes no sense to me at all. fd is passed by value but "buf" by name?

It's horribly inconsistent and unpleasant to 

Re: Some questions on SYSCALL

2022-06-29 Thread Lionel B. Dyck
Some align the end with the do, others align the end with the code in the do 
structure.  The key is a consistent style for readability.

The REXXFORM results of my example are:

/* rexx */   
 x = bpxwunix('find /u/user/work/',,out.,err.)
 do I = 1 to out.0
   say out.i  
 end  


Lionel B. Dyck <><
Website: https://www.lbdsoftware.com
Github: https://github.com/lbdyck

“Worry more about your character than your reputation. Character is what you 
are, reputation merely what others think you are.”   - - - John Wooden

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
David Crayford
Sent: Wednesday, June 29, 2022 07:32 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On 29/06/2022 8:27 pm, Lionel B. Dyck wrote:
> The formatting was a quick and dirty - I typically use the REXXFORM edit 
> macro to clean up alignments and keep things neat.

I'm not knocking your code Lionel. It's more the case that I don't like what 
has become common formatting of REXX code blocks where the end is indented at 
the end of the block. Is this REXX pretending to be Python by obscuring the 
"end"?

if/do/ ...
...
   end



>
> You can find it at https://github.com/lbdyck/rexxform - I ported it from z/VM 
> to work as an edit macro.
>
> Yes - you could use SYSCALLS and get the same info but this was a 
> quick and easy answer
>
> Enjoy
>
> Lionel B. Dyck <><
> Website: https://www.lbdsoftware.com
> Github: https://github.com/lbdyck
>
> “Worry more about your character than your reputation. Character is what you 
> are, reputation merely what others think you are.”   - - - John Wooden
>
> -Original Message-
> From: IBM Mainframe Discussion List  On 
> Behalf Of David Crayford
> Sent: Wednesday, June 29, 2022 07:19 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Some questions on SYSCALL
>
> Thanks Lionel. If I want to get the directory entry I suppose I have to also 
> execute bpxwunix("ls ") or use SYSCALLS?
>
> BTW, I really wish the "end" scope terminater would match the "do"
> column alignment. It's just another reason for me to hate on REXX when it's 
> become common practice to uses bizarre formatting rules.
>
> On 29/06/2022 8:12 pm, Lionel B. Dyck wrote:
>> Perhaps something like this will give you what you want to recursively 
>> traverse a directory:
>>
>> x = bpxwunix('find /u/user/work/',,out.,err.) do I = 1 to out.0
>>  say out.i
>>  end
>>
>>
>> Lionel B. Dyck <><
>> Website: https://www.lbdsoftware.com
>> Github: https://github.com/lbdyck
>>
>> “Worry more about your character than your reputation. Character is what you 
>> are, reputation merely what others think you are.”   - - - John Wooden
>>
>> -Original Message-
>> From: IBM Mainframe Discussion List  On 
>> Behalf Of David Crayford
>> Sent: Wednesday, June 29, 2022 07:07 AM
>> To: IBM-MAIN@LISTSERV.UA.EDU
>> Subject: Re: Some questions on SYSCALL
>>
>> On 29/06/2022 6:37 pm, Seymour J Metz wrote:
>>> Sme, but manageable. The article Safe REXX at 
>>> <http://www.rexxla.org/Newsletter/9812safe.html> and 
>>> <http://www.rexxla.org/Newsletter/9901safe.html;> has some tips on avoiding 
>>> REXX pitfalls.
>> What's the point in managing something when you can just use a better 
>> language? It's a good time to be working on z/OS as we have an abundance of 
>> choice. That's not entirely obvious on this forum where every problem seems 
>> to be met with a ham-fisted REXX solution.
>>
>> Yes, Crayford's bashing REXX again. I have some experience of using z/OS 
>> UNIX REXX services but I didn't find it productive. Maybe somebody with more 
>> knowledge than me could post a snippet that demonstrates how to recursively 
>> traverse a directory tree printing the entries.
>>
>>
>>
>>> --
>>> Shmuel (Seymour J.) Metz
>>> http://mason.gmu.edu/~smetz3
>>>
>>> 
>>> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on 
>>> behalf of David Crayford [dcrayf...@gmail.com]
>>> Sent: Tuesday, June 28, 2022 11:31 PM
>>> To: IBM-MAIN@LISTSERV.UA.EDU
>>> Subject: Re: Some questions on SYSCALL
>>>
>>> On 29/06/2022 5:42 am, Charles Mills wrote:
>>>> "write" fd "buf"
>>>>
>>>> Which makes no sense to me at all. fd is passed by 

Re: Some questions on SYSCALL

2022-06-29 Thread David Crayford

On 29/06/2022 8:27 pm, Lionel B. Dyck wrote:

The formatting was a quick and dirty - I typically use the REXXFORM edit macro 
to clean up alignments and keep things neat.


I'm not knocking your code Lionel. It's more the case that I don't like 
what has become common formatting of REXX code blocks where the end is 
indented at the end of the block. Is this REXX pretending to be Python 
by obscuring the "end"?


if/do/ ...
   ...
  end





You can find it at https://github.com/lbdyck/rexxform - I ported it from z/VM 
to work as an edit macro.

Yes - you could use SYSCALLS and get the same info but this was a quick and 
easy answer

Enjoy

Lionel B. Dyck <><
Website: https://www.lbdsoftware.com
Github: https://github.com/lbdyck

“Worry more about your character than your reputation. Character is what you 
are, reputation merely what others think you are.”   - - - John Wooden

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
David Crayford
Sent: Wednesday, June 29, 2022 07:19 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

Thanks Lionel. If I want to get the directory entry I suppose I have to also execute 
bpxwunix("ls ") or use SYSCALLS?

BTW, I really wish the "end" scope terminater would match the "do"
column alignment. It's just another reason for me to hate on REXX when it's 
become common practice to uses bizarre formatting rules.

On 29/06/2022 8:12 pm, Lionel B. Dyck wrote:

Perhaps something like this will give you what you want to recursively traverse 
a directory:

x = bpxwunix('find /u/user/work/',,out.,err.) do I = 1 to out.0
 say out.i
 end


Lionel B. Dyck <><
Website: https://www.lbdsoftware.com
Github: https://github.com/lbdyck

“Worry more about your character than your reputation. Character is what you 
are, reputation merely what others think you are.”   - - - John Wooden

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
David Crayford
Sent: Wednesday, June 29, 2022 07:07 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On 29/06/2022 6:37 pm, Seymour J Metz wrote:

Sme, but manageable. The article Safe REXX at 
<http://www.rexxla.org/Newsletter/9812safe.html> and 
<http://www.rexxla.org/Newsletter/9901safe.html;> has some tips on avoiding REXX 
pitfalls.

What's the point in managing something when you can just use a better language? 
It's a good time to be working on z/OS as we have an abundance of choice. 
That's not entirely obvious on this forum where every problem seems to be met 
with a ham-fisted REXX solution.

Yes, Crayford's bashing REXX again. I have some experience of using z/OS UNIX 
REXX services but I didn't find it productive. Maybe somebody with more 
knowledge than me could post a snippet that demonstrates how to recursively 
traverse a directory tree printing the entries.




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


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on
behalf of David Crayford [dcrayf...@gmail.com]
Sent: Tuesday, June 28, 2022 11:31 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On 29/06/2022 5:42 am, Charles Mills wrote:

"write" fd "buf"

Which makes no sense to me at all. fd is passed by value but "buf" by name?

It's horribly inconsistent and unpleasant to use. The buffer HAS to be
a passed by reference (variable) as it could break REXX string length
limits or contain characters that REXX chokes on.
I can't help but think that you've made a rod for your back. REXX is
superficially simple but in my experience, which is 30 years of using
the language, it is anything but and has endless pitfalls.

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

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

Re: Some questions on SYSCALL

2022-06-29 Thread Lionel B. Dyck
The formatting was a quick and dirty - I typically use the REXXFORM edit macro 
to clean up alignments and keep things neat.

You can find it at https://github.com/lbdyck/rexxform - I ported it from z/VM 
to work as an edit macro.

Yes - you could use SYSCALLS and get the same info but this was a quick and 
easy answer

Enjoy

Lionel B. Dyck <><
Website: https://www.lbdsoftware.com
Github: https://github.com/lbdyck

“Worry more about your character than your reputation. Character is what you 
are, reputation merely what others think you are.”   - - - John Wooden

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
David Crayford
Sent: Wednesday, June 29, 2022 07:19 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

Thanks Lionel. If I want to get the directory entry I suppose I have to also 
execute bpxwunix("ls ") or use SYSCALLS?

BTW, I really wish the "end" scope terminater would match the "do" 
column alignment. It's just another reason for me to hate on REXX when it's 
become common practice to uses bizarre formatting rules.

On 29/06/2022 8:12 pm, Lionel B. Dyck wrote:
> Perhaps something like this will give you what you want to recursively 
> traverse a directory:
>
> x = bpxwunix('find /u/user/work/',,out.,err.) do I = 1 to out.0
> say out.i
> end
>
>
> Lionel B. Dyck <><
> Website: https://www.lbdsoftware.com
> Github: https://github.com/lbdyck
>
> “Worry more about your character than your reputation. Character is what you 
> are, reputation merely what others think you are.”   - - - John Wooden
>
> -Original Message-
> From: IBM Mainframe Discussion List  On Behalf Of 
> David Crayford
> Sent: Wednesday, June 29, 2022 07:07 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Some questions on SYSCALL
>
> On 29/06/2022 6:37 pm, Seymour J Metz wrote:
>> Sme, but manageable. The article Safe REXX at 
>> <http://www.rexxla.org/Newsletter/9812safe.html> and 
>> <http://www.rexxla.org/Newsletter/9901safe.html;> has some tips on avoiding 
>> REXX pitfalls.
> What's the point in managing something when you can just use a better 
> language? It's a good time to be working on z/OS as we have an abundance of 
> choice. That's not entirely obvious on this forum where every problem seems 
> to be met with a ham-fisted REXX solution.
>
> Yes, Crayford's bashing REXX again. I have some experience of using z/OS UNIX 
> REXX services but I didn't find it productive. Maybe somebody with more 
> knowledge than me could post a snippet that demonstrates how to recursively 
> traverse a directory tree printing the entries.
>
>
>
>> --
>> Shmuel (Seymour J.) Metz
>> http://mason.gmu.edu/~smetz3
>>
>> ____
>> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on
>> behalf of David Crayford [dcrayf...@gmail.com]
>> Sent: Tuesday, June 28, 2022 11:31 PM
>> To: IBM-MAIN@LISTSERV.UA.EDU
>> Subject: Re: Some questions on SYSCALL
>>
>> On 29/06/2022 5:42 am, Charles Mills wrote:
>>> "write" fd "buf"
>>>
>>> Which makes no sense to me at all. fd is passed by value but "buf" by name?
>> It's horribly inconsistent and unpleasant to use. The buffer HAS to be
>> a passed by reference (variable) as it could break REXX string length
>> limits or contain characters that REXX chokes on.
>> I can't help but think that you've made a rod for your back. REXX is
>> superficially simple but in my experience, which is 30 years of using
>> the language, it is anything but and has endless pitfalls.
>>
>> --
>> 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
>
> --
> 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: Some questions on SYSCALL

2022-06-29 Thread David Crayford
Thanks Lionel. If I want to get the directory entry I suppose I have to 
also execute bpxwunix("ls ") or use SYSCALLS?


BTW, I really wish the "end" scope terminater would match the "do" 
column alignment. It's just another reason for me to hate on REXX when 
it's become common practice to uses bizarre formatting rules.


On 29/06/2022 8:12 pm, Lionel B. Dyck wrote:

Perhaps something like this will give you what you want to recursively traverse 
a directory:

x = bpxwunix('find /u/user/work/',,out.,err.)
do I = 1 to out.0
say out.i
end


Lionel B. Dyck <><
Website: https://www.lbdsoftware.com
Github: https://github.com/lbdyck

“Worry more about your character than your reputation. Character is what you 
are, reputation merely what others think you are.”   - - - John Wooden

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
David Crayford
Sent: Wednesday, June 29, 2022 07:07 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On 29/06/2022 6:37 pm, Seymour J Metz wrote:

Sme, but manageable. The article Safe REXX at 
<http://www.rexxla.org/Newsletter/9812safe.html> and 
<http://www.rexxla.org/Newsletter/9901safe.html;> has some tips on avoiding REXX 
pitfalls.

What's the point in managing something when you can just use a better language? 
It's a good time to be working on z/OS as we have an abundance of choice. 
That's not entirely obvious on this forum where every problem seems to be met 
with a ham-fisted REXX solution.

Yes, Crayford's bashing REXX again. I have some experience of using z/OS UNIX 
REXX services but I didn't find it productive. Maybe somebody with more 
knowledge than me could post a snippet that demonstrates how to recursively 
traverse a directory tree printing the entries.




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


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on
behalf of David Crayford [dcrayf...@gmail.com]
Sent: Tuesday, June 28, 2022 11:31 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On 29/06/2022 5:42 am, Charles Mills wrote:

"write" fd "buf"

Which makes no sense to me at all. fd is passed by value but "buf" by name?

It's horribly inconsistent and unpleasant to use. The buffer HAS to be
a passed by reference (variable) as it could break REXX string length
limits or contain characters that REXX chokes on.
I can't help but think that you've made a rod for your back. REXX is
superficially simple but in my experience, which is 30 years of using
the language, it is anything but and has endless pitfalls.

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

--
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: Some questions on SYSCALL

2022-06-29 Thread Lionel B. Dyck
Perhaps something like this will give you what you want to recursively traverse 
a directory:

x = bpxwunix('find /u/user/work/',,out.,err.)
do I = 1 to out.0
   say out.i
   end


Lionel B. Dyck <><
Website: https://www.lbdsoftware.com
Github: https://github.com/lbdyck

“Worry more about your character than your reputation. Character is what you 
are, reputation merely what others think you are.”   - - - John Wooden

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
David Crayford
Sent: Wednesday, June 29, 2022 07:07 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On 29/06/2022 6:37 pm, Seymour J Metz wrote:
> Sme, but manageable. The article Safe REXX at 
> <http://www.rexxla.org/Newsletter/9812safe.html> and 
> <http://www.rexxla.org/Newsletter/9901safe.html;> has some tips on avoiding 
> REXX pitfalls.

What's the point in managing something when you can just use a better language? 
It's a good time to be working on z/OS as we have an abundance of choice. 
That's not entirely obvious on this forum where every problem seems to be met 
with a ham-fisted REXX solution.

Yes, Crayford's bashing REXX again. I have some experience of using z/OS UNIX 
REXX services but I didn't find it productive. Maybe somebody with more 
knowledge than me could post a snippet that demonstrates how to recursively 
traverse a directory tree printing the entries.



>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> 
> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on 
> behalf of David Crayford [dcrayf...@gmail.com]
> Sent: Tuesday, June 28, 2022 11:31 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Some questions on SYSCALL
>
> On 29/06/2022 5:42 am, Charles Mills wrote:
>> "write" fd "buf"
>>
>> Which makes no sense to me at all. fd is passed by value but "buf" by name?
> It's horribly inconsistent and unpleasant to use. The buffer HAS to be 
> a passed by reference (variable) as it could break REXX string length 
> limits or contain characters that REXX chokes on.
> I can't help but think that you've made a rod for your back. REXX is 
> superficially simple but in my experience, which is 30 years of using 
> the language, it is anything but and has endless pitfalls.
>
> --
> 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

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


Re: Some questions on SYSCALL

2022-06-29 Thread David Crayford

On 29/06/2022 6:37 pm, Seymour J Metz wrote:

Sme, but manageable. The article Safe REXX at 
<http://www.rexxla.org/Newsletter/9812safe.html> and 
<http://www.rexxla.org/Newsletter/9901safe.html;> has some tips on avoiding REXX 
pitfalls.


What's the point in managing something when you can just use a better 
language? It's a good time to be working on z/OS as we have an abundance 
of choice. That's not entirely obvious on this forum where every problem 
seems to be met with a ham-fisted REXX solution.


Yes, Crayford's bashing REXX again. I have some experience of using z/OS 
UNIX REXX services but I didn't find it productive. Maybe somebody with 
more knowledge than me could post a snippet that demonstrates how to 
recursively traverse a directory tree printing the entries.






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


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
David Crayford [dcrayf...@gmail.com]
Sent: Tuesday, June 28, 2022 11:31 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On 29/06/2022 5:42 am, Charles Mills wrote:

"write" fd "buf"

Which makes no sense to me at all. fd is passed by value but "buf" by name?

It's horribly inconsistent and unpleasant to use. The buffer HAS to be a
passed by reference (variable) as it could break REXX string length
limits or contain characters that REXX chokes on.
I can't help but think that you've made a rod for your back. REXX is
superficially simple but in my experience, which is 30 years of using
the language, it is anything but and has endless pitfalls.

--
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: Some questions on SYSCALL

2022-06-29 Thread Seymour J Metz
Passing the buffer by value would cause the parameters of write to be 
inconsistent with the parameters of read. IMHO, making them consistent is 
intuitive.


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


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Charles Mills [charl...@mcn.org]
Sent: Tuesday, June 28, 2022 6:32 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

I think that for write you pass the buffer by name, not its Rexx value. Believe 
it or not.

That is what the example in the manual shows, and that is what is working in my 
code:

"write" Filefd "Record" Length(Record)

Is writing the contents of Record, not the literal "Record". Definitely 
counterintuitive. Definitely astonishing.

Maybe (Record) would work. I have not tried, and that is not what the examples 
show.

Charles


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Paul Gilmartin
Sent: Tuesday, June 28, 2022 3:01 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On Tue, 28 Jun 2022 14:42:45 -0700, Charles Mills wrote:

>I am still not quite understanding the usage of Rexx variables with SYSCALL.
>
>If myFileName = "/u/myfile" then do I want to code
>
>"SYSCALL open myFileName" or "SYSCALL open" myFileName  ?
>
address SYSCALL "open" myFileName  /* Rexx evaluates myFileName.  */

>In other words, does myFileName get passed by value, or does SYSCALL do an 
>IRXEXCOM to find its value from its name?
>
Not really.
say myFileName  /* Rexx evaluates.  */

>Ditto for SYSCALL write. The example on 
>https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ibm.com%2Fdocs%2Fen%2Fzos%2F2.1.0%3Ftopic%3Dscd-writedata=05%7C01%7Csmetz3%40gmu.edu%7Cf2ef520f86e24b11c9a508da59562d41%7C9e857255df574c47a0c00546460380cb%7C0%7C0%7C637920523919308904%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=%2B5YJ6q2Lwcba9IzsNPCFcSqzjGrfulK1BcWqkuY2B7Y%3Dreserved=0
> shows
>
>"write" fd "buf"
>
>Which makes no sense to me at all. fd is passed by value but "buf" by name?
>
Both by value.
string = "Hello world"ESC_N
address SYSCALL "write 1 (string)"

Specifying a syscall command
Specifying strings
A variable name enclosed in parentheses.
Strings that contain both the single quotation mark and
double quotation mark characters must be stored in a variable,
and you must use the variable name.

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

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


  1   2   >