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: REXX outside TSO

2022-06-29 Thread Paul Gilmartin
On Wed, 29 Jun 2022 19:44:15 -0400, Bob Bridges wrote:

>I've heard the word "awk", but never been exposed to it.  I had the 
>impression, though, that I've heard of it in the context of Unix; am I 
>mistaken?
>
UNIX, yes.  Which means it's readily available on z/OS, Mac OS, and Linux.
Similar to Rexx in expressive power.

Both have some useful form of associative arrays.  Pedants will argue over
the precise definition.  Awk allows expressions in array subscripts.

Awk has two datatypes: string and number.  I've stumbled over the
distinction on (very few) occasions.

Rexx has arbitrary precision arithmetic; awk hasn't.  But that precludes Rexx's
having elementary arithmetic functions which awk has.

Neither has lexical scoping.  Each has a clumsy alternative.

Regular expressions are intrinsic to awk; absent from Rexx which has
PARSE as a poor substitute.

Awk is "data driven".  Rexx could do very similar with a simple loop.


>Remember, the topic of the moment was whether there's any use for REXX 
>~outside~ TSO.  This was on a Windows system; I'm guessing awk wouldn't be one 
>of the available tools (even if I knew anything about it, I mean).
>
Cygwin?  The only thing that made Windows tolerable for me.  Ubuntu basn?

We'll undoubtedly hear from people who loathe each.  Sometimes the same people.

-- 
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 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: REXX outside TSO

2022-06-29 Thread David Crayford

On 30/06/2022 7:44 am, Bob Bridges wrote:

I've heard the word "awk", but never been exposed to it.  I had the impression, 
though, that I've heard of it in the context of Unix; am I mistaken?

Remember, the topic of the moment was whether there's any use for REXX 
~outside~ TSO.  This was on a Windows system; I'm guessing awk wouldn't be one 
of the available tools (even if I knew anything about it, I mean).


Gil says "I nominate ADDRESS SYSCALL and ADDRESS ISREDIT. What other 
languages are comparable?" where he conflates a language with a library.


What other languages are comparable? OMG, every language that supports 
regular expression or has a PEG library. Hammer and nail again (and again)!





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

/* Engineers will go without food and hygiene for days to solve a problem.  (Other times 
just because they forgot.)  -from "Are You an Engineer?" */

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Paul Gilmartin
Sent: Wednesday, June 29, 2022 13:06

On Wed, 29 Jun 2022 12:00:12 -0400, Bob Bridges wrote:

... writing a REXX that read the raw firewall extract and created a CSV in 
about 20 seconds.  REXX makes ~very~ short work of parsing.  At the time I 
don’t think I knew VBScript, but it surely would have been harder.


For that sort of thing, I generally rely on "awk".  PARSE and regex have 
considerable overlap.



... Again, I see REXX's most valuable strength as parsing strings.  
Occasionally that strength is valuable outside TSO.


I nominate ADDRESS SYSCALL and ADDRESS ISREDIT.  What other languages are 
comparable?  OK.  The SYSCALL functions are mostly in C RTL, and ISREDIT 
commands callable from HLASM, C, COBOL, ... but harder.

Now that ISPF Edit has regex, it would be precious if it suupported 
back-references.

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


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


Re: REXX outside TSO

2022-06-29 Thread Farley, Peter x23353
Not intending to continue this thread, but awk is a favorite tool of mine.  You 
certainly can run z/OS awk in a fairly simple batch JCL, though I have not 
tried it under TSO or batch TSO.

I far prefer the GNU awk (gawk) on my personal machines (Win10 64-bit), but 
z/OS awk is (mostly) POSIX awk, so most of the parts you want are there.  
Significantly lacking from z/OS awk are the extra time and date functions 
provide by gawk, and a few other niceties, but by and large it "just works".

For Windows gawk binaries (and a lot of other useful *ix tools) I find this 
site is the best:

https://sourceforge.net/projects/ezwinports/files/

Peter

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of Bob 
Bridges
Sent: Wednesday, June 29, 2022 7:44 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX outside TSO

I've heard the word "awk", but never been exposed to it.  I had the impression, 
though, that I've heard of it in the context of Unix; am I mistaken?

Remember, the topic of the moment was whether there's any use for REXX 
~outside~ TSO.  This was on a Windows system; I'm guessing awk wouldn't be one 
of the available tools (even if I knew anything about it, I mean).

---

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


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


Re: REXX outside TSO

2022-06-29 Thread Bob Bridges
I've heard the word "awk", but never been exposed to it.  I had the impression, 
though, that I've heard of it in the context of Unix; am I mistaken?

Remember, the topic of the moment was whether there's any use for REXX 
~outside~ TSO.  This was on a Windows system; I'm guessing awk wouldn't be one 
of the available tools (even if I knew anything about it, I mean).

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

/* Engineers will go without food and hygiene for days to solve a problem.  
(Other times just because they forgot.)  -from "Are You an Engineer?" */

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Paul Gilmartin
Sent: Wednesday, June 29, 2022 13:06

On Wed, 29 Jun 2022 12:00:12 -0400, Bob Bridges wrote:
>
>... writing a REXX that read the raw firewall extract and created a CSV in 
> about 20 seconds.  REXX makes ~very~ short work of parsing.  At the time I 
> don’t think I knew VBScript, but it surely would have been harder.
> 
For that sort of thing, I generally rely on "awk".  PARSE and regex have 
considerable overlap.


>... Again, I see REXX's most valuable strength as parsing strings.  
> Occasionally that strength is valuable outside TSO.
>
I nominate ADDRESS SYSCALL and ADDRESS ISREDIT.  What other languages are 
comparable?  OK.  The SYSCALL functions are mostly in C RTL, and ISREDIT 
commands callable from HLASM, C, COBOL, ... but harder.

Now that ISPF Edit has regex, it would be precious if it suupported 
back-references.

--
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: Allocating PC numbers

2022-06-29 Thread Colin Paice
Perhaps have a global name token - so applications can find it
Colin

On Wed, 29 Jun 2022 at 20:22, Ngan, Robert (DXC Luxoft) 
wrote:

> Use the LXRES service.
> Then all you need to do is figure out how you want to "publish" your PC
> number to its potential users.
>
> Robert Ngan
> DXC Luxoft
>
> -Original Message-
> Date:Tue, 28 Jun 2022 16:11:37 -0400
> From:Tony Thigpen 
> Subject: Allocating PC numbers
>
> When on z/OS and you want to create a PC routine, how do you determine
> what PC number the new routine is going to use? Is there a list of
> 'used' ones somewhere? Are, do you do some sort of loop checking to see
> what is free?
>
> Tony Thigpen
>
>
>
>
> --
> 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: Allocating PC numbers

2022-06-29 Thread Ngan, Robert (DXC Luxoft)
Use the LXRES service.
Then all you need to do is figure out how you want to "publish" your PC number 
to its potential users.

Robert Ngan
DXC Luxoft

-Original Message-
Date:Tue, 28 Jun 2022 16:11:37 -0400
From:Tony Thigpen 
Subject: Allocating PC numbers

When on z/OS and you want to create a PC routine, how do you determine
what PC number the new routine is going to use? Is there a list of
'used' ones somewhere? Are, do you do some sort of loop checking to see
what is free?

Tony Thigpen




--
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: AF/OPER replacement with BMC Mainview AutoOperator

2022-06-29 Thread Jack Zukt
Hi,
I worked for a few years with Mainview AutoOperator, before we were forced
to change to IBM's TSA. It was a great product, very easy to use. I suppose
that it can only have improved. Given the chance I would go back to it.
Jack

On Wed, Jun 29, 2022, 16:28 IBM user  wrote:

> Has anyone replaced IBM AF/OPERator with BMC Mainview AutoOperator?
> The announcement letter states that IBM‘s product will be discontinued
> from service in April 2024.
>
> --
> 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 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: REXX outside TSO

2022-06-29 Thread Paul Gilmartin
On Wed, 29 Jun 2022 12:00:12 -0400, Bob Bridges wrote:
>
>... writing a REXX that read the raw firewall extract and created a CSV in 
> about 20 seconds.  REXX makes ~very~ short work of parsing.  At the time I 
> don’t think I knew VBScript, but it surely would have been harder.
> 
For that sort of thing, I generally rely on "awk".  PARSE and regex have
considerable overlap.


>... Again, I see REXX's most valuable strength as parsing strings.  
> Occasionally that strength is valuable outside TSO.
>
I nominate ADDRESS SYSCALL and ADDRESS ISREDIT.  What other languages
are comparable?  OK.  The SYSCALL functions are mostly in C RTL, and ISREDIT
commands callable from HLASM, C, COBOL, ... but harder.

Now that ISPF Edit has regex, it would be precious if it suupported
back-references.

-- 
gil

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


Re: How to identify holddata date

2022-06-29 Thread ITschak Mugzach
Thanks Kurt.

At least I know that holddata is current. Some more questions about PUTs &
RSUs.

   - When exactly IBM releases the monthly RSU? beginning of next month?
   - I noticed that some PTFs such as security related have NVD like
   severity (Bx.y) What is A in Symptoms?
   - IBM plans to drop PUT files for RSUs. When will this happen?

Best,
ITschak

ITschak Mugzach
*|** IronSphere Platform* *|* *Information Security Continuous Monitoring
for z/OS, x/Linux & IBM I **| z/VM coming soon  *




On Tue, Jun 28, 2022 at 8:36 PM Itschak Mugzach 
wrote:

> Thanks Kurt.
>
> My idea was to produce a report sourceid on the global target zones (since
> acept will remove the PTFs related to this sourceid) and get the last
> PUT listed. This one will work even if I am running on a lower level
> system. correct?
>
> ITschak
>
> *| **Itschak Mugzach | Director | SecuriTeam Software **|** IronSphere
> Platform* *|* *Information Security Continuous Monitoring for Z/OS,
> zLinux and IBM I **|  *
>
> *|* *Email**: i_mugz...@securiteam.co.il **|* *Mob**: +972 522 986404 **|*
> *Skype**: ItschakMugzach **|* *Web**: www.Securiteam.co.il  **|*
>
>
>
>
>
> On Tue, Jun 28, 2022 at 5:27 PM Kurt J. Quackenbush 
> wrote:
>
>> > I would like to check the last date holddata was received on my MVS
>> csi, without looking at the logs. Is that information written somewhere in
>> SMP and can be retrieved by query?
>>
>> SMP/E does maintain the date each ++HOLD statement was received, but it
>> does not expose it, not even in the CSI Query API.  However, z/OSMF
>> Software Management has two reports which query the HOLDDATA and both
>> expose that date.  So, if you define a Software Instance for your installed
>> software you can perform the Maintenance Reports -> Missing Critical
>> Service or Missing FIXCAT SYSMODs actions.  The resulting report contains a
>> "HOLDDATA Received" column indicating the most recent date ERROR or FIXCAT
>> HOLDDATA was received into the global zone.
>>
>> Kurt Quackenbush
>> IBM  |  z/OS SMP/E and z/OSMF Software Management  |  ku...@us.ibm.com
>>
>> Chuck Norris never uses CHECK when he applies PTFs.
>>
>> --
>> 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


REXX outside TSO

2022-06-29 Thread Bob Bridges
For what it's worth, I've had that need.  Only twice, I admit:

1) At one employer I overheard my boss talking on the phone; apparently they'd 
been tracking viri by looking at firewall logs and analyzing connections that 
had been refused.  (A machine that sends 10 000 packets to one IP address is 
probably fine; one that sends 1 packet to each of 10 000 IP addresses is a 
virus looking for more victims.)  But they were doing it by loading 2MB or so 
of firewall logs into Excel, then sorting and culling and parsing; it took them 
a couple of hours to do it each time.  I downloaded Regina REXX onto my machine 
at work and spent that amount of time writing a REXX that read the raw firewall 
extract and created a CSV in about 20 seconds.  REXX makes ~very~ short work of 
parsing.  At the time I don’t think I knew VBScript, but it surely would have 
been harder.

2) A developer I know asked me to work out a way to turn his plain-text error 
messages into a decent format for user documentation, in PDF.  We worked out a 
plan where I'd turn his plain text into RTF, then get Word to read the RDF and 
write it out as PDF.  (I don't know anything about PDF, you see.  I didn't know 
anything to speak of about RTF, either, but I found the specs on-line and 
learned.)  I tried doing that in VBS or VBA, but the parsing just got too hard. 
 That’s when I broke down and got myself a copy of ooREXX, which I had lusted 
after ever since I heard about it but never had an excuse.

Turns out ooREXX has a lot of capabilities that I had to study up on before I 
could use it effectively, so I took a day or two off to read and play.  But it 
works now.

Again, I see REXX's most valuable strength as parsing strings.  Occasionally 
that strength is valuable outside TSO.

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

/* A man who carries a cat by the tail learns something that can be learned in 
no other way.  -Mark Twain */

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
David Crayford
Sent: Wednesday, June 29, 2022 11:27

I just can't see any use for REXX outside of TSO/ISPF.

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


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


AF/OPER replacement with BMC Mainview AutoOperator

2022-06-29 Thread IBM user
Has anyone replaced IBM AF/OPERator with BMC Mainview AutoOperator? 
The announcement letter states that IBM‘s product will be discontinued from 
service in April 2024.

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

 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.




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



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

Retire, sure, but not leave!

2022-06-29 Thread Bob Bridges
Wait a minute, are you saying you won't be here any more?  Why, for heaven's 
sake?  By all means retire, but...

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

/* It's better to be on the ground wishing you were in the air, than in the air 
wishing you were on the ground.  -Lesson learned from flying through a 
thunderstorm */

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Lennie Dymoke-Bradshaw
Sent: Wednesday, June 29, 2022 09:42

Happy retirement Bill!

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Bill Schoen
Sent: 29 June 2022 13:48
.
Probably my last post before retirement tomorrow.

--
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
 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: How to identify holddata date

2022-06-29 Thread Kurt J. Quackenbush
> My idea was to produce a report sourceid on the global target zones (since 
> acept will remove the PTFs related to this sourceid) and get the last PUT 
> listed. This one will work even if I am running on a lower level system. 
> correct?

REPORT SOURCEID will show you all of the sourceids assigned to the PTFs applied 
in a target zone.  The PUT sourceids indicate the year and month a PTF 
became available.  More than likely you did receive HOLDDATA along with a 
PUT PTF, so you can imply you have HOLDDATA at least as current as the 
year/month of the PUT sourceid.  That's not very granular, and you may have 
received HOLDDATA much more recently than that, but perhaps that's all you 
need. 

Kurt Quackenbush
IBM  |  z/OS SMP/E and z/OSMF Software Management  |  ku...@us.ibm.com

Chuck Norris never uses CHECK when he applies PTFs.

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


Re: [EXTERNAL] Java?

2022-06-29 Thread Pommier, Rex
Bob,

No, we run a small amount of java as straight batch.  One example is the IBM 
SCRT monthly processing.  Straight batch job:

//JAVAJVM  EXEC PGM=JVMLDM86,REGION=0M,PARM='/ com.ibm.scrt.SCRTe '

Rex


-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of Bob 
Bridges
Sent: Wednesday, June 29, 2022 8:53 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: [EXTERNAL] Java?

I really gotta learn Java.  If five belts around my waist are good, six would 
be even better.  But mostly I stick to languages that my clients already have, 
and even better if possible, know how to maintain.  Where is Java usable?  On 
the mainframe, only Unix, right?

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

/* Linda Levy dragged me out to the floor for a dance and I stood there like a 
totem pole in a body cast.  -Miami Herald columnist Leonard Pitts, recalling 
his failure as a ballroom dancer. */

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
David Crayford
Sent: Tuesday, June 28, 2022 18:39

 REXX isn't so simple after all! You would have been better off 
writing your code in Java, or if you have installed the new Open XL C/C++ 
compiler/runtime you could use the C++17 filesystem library.

To me, just having to check return codes instead of relying on exceptions is a 
good enough reason to dodge REXX.

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

--
The information contained in this message is confidential, protected from 
disclosure and may be legally privileged. If the reader of this message is not 
the intended recipient or an employee or agent responsible for delivering this 
message to the intended recipient, you are hereby notified that any disclosure, 
distribution, copying, or any action taken or action omitted in reliance on it, 
is strictly prohibited and may be unlawful. If you have received this 
communication in error, please notify us immediately by replying to this 
message and destroy the material in its entirety, whether in electronic or hard 
copy format. Thank you.


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

Java?

2022-06-29 Thread Bob Bridges
I really gotta learn Java.  If five belts around my waist are good, six would 
be even better.  But mostly I stick to languages that my clients already have, 
and even better if possible, know how to maintain.  Where is Java usable?  On 
the mainframe, only Unix, right?

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

/* Linda Levy dragged me out to the floor for a dance and I stood there like a 
totem pole in a body cast.  -Miami Herald columnist Leonard Pitts, recalling 
his failure as a ballroom dancer. */

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
David Crayford
Sent: Tuesday, June 28, 2022 18:39

 REXX isn't so simple after all! You would have been better off 
writing your code in Java, or if you have installed the new Open XL C/C++ 
compiler/runtime you could use the C++17 filesystem library.

To me, just having to check return codes instead of relying on exceptions is a 
good enough reason to dodge 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-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: ... SYSCALL ... And Thanks!

2022-06-29 Thread Seymour J Metz
Yes, the parameter limit is for call and function invocation. A command can 
only have parameter.


From: IBM Mainframe Discussion List  on behalf of 
Paul Gilmartin <042bfe9c879d-dmarc-requ...@listserv.ua.edu>
Sent: Wednesday, June 29, 2022 9:09 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: ... SYSCALL ... And Thanks!

On Jun 29, 2022, at 06:48:14, Bill Schoen wrote
>  ...
> 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.
> .
I thoughht it was exactly one: a command string.

> Probably my last post before retirement tomorrow.
> Bill Schoen
>
You have been enormously helpful.  Thank you!

--
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: 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: ... SYSCALL ... And Thanks!

2022-06-29 Thread David Crayford

On 29/06/2022 9:09 pm, Paul Gilmartin wrote:

On Jun 29, 2022, at 06:48:14, Bill Schoen wrote

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

I thoughht it was exactly one: a command string.


Probably my last post before retirement tomorrow.
Bill Schoen


Thanks Bill, you're guidance has been much appreciated.

I wish the other retirees on this forum would follow your lead.

  

You have been enormously helpful.  Thank you!



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


The fog clears, a little bit

2022-06-29 Thread Bob Bridges
Dale, I never got it quite clear in my head until just now.  I'm comfortable 
when I have to examine RC to see how a routine worked, but I knew that RESULT 
also did something, sometimes, and I was never sure exactly what.  Many times 
in past programs I had to test my program looking at RC and at RESULT, to see 
which one I wanted.  Now I think I've got it.  Thanks.

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

/* The trouble with having an open mind, of course, is that people will insist 
on coming along and trying to put things in it.  -Terry Pratchett */

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Dale R. Smith
Sent: Tuesday, June 28, 2022 18:06

SYSCALLS is a REXX Function.  REXX Functions always return a value (or fail if 
the syntax is wrong!).

x = Function(arg1,arg2...)Would set "x" to whatever value Function returns

Call Function arg1, arg2...Sets REXX special variable "result" to whatever 
value Function returns

--
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: ... SYSCALL ... And Thanks!

2022-06-29 Thread Paul Gilmartin
On Jun 29, 2022, at 06:48:14, Bill Schoen wrote
>  ...
> 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.
> . 
I thoughht it was exactly one: a command string.

> Probably my last post before retirement tomorrow.
> Bill Schoen
>  
You have been enormously helpful.  Thank you!

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

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 
 
and 
 
has some tips on avoiding REXX pitfalls.
What's the point in managing something when you can just use a 

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




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

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

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




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

2022-06-29 Thread John S. Giltner, Jr.
Looking at the CSSMTP documentation it seems to imply that if you have 
NODENAME=REQUIRED that you need to have DEST and DESTID the same as what you 
have coded for ExtWrtName"  They give the examples of:

 $ADD DESTID(),DEST=

To dynamically adding it and coding the following in your initialization 
parameters:

 DESTID() DEST()

Reference:

 https://www.ibm.com/docs/en/zos/2.4.0?topic=statements-extwrtname-statement

Under restrictions.  I have not looked at the JES2 parameters to see if coding:

  DESTID(CSSMTP) DEST(CSSMTP) 

Would be valid or not.

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




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



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






--
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: Allocating PC numbers

2022-06-29 Thread Tony Thigpen

Thanks Peter.

I have been running my test program (that I got from somewhere) and 
realized that I was off-base with my understanding.


I am also coming to understand that some of the stuff done by the 
program was not needed or incorrect, but still worked.


For instance, it does an AXRES, followed by an LXRES and ETDEF. I don't 
see any reason for the AXRES. Maybe I am still not reading everything right.


Tony Thigpen

Peter Relson wrote on 6/29/22 07:27:


how do you determine
what PC number the new routine is going to use? Is there a list of
'used' ones somewhere? Are, do you do some sort of loop checking to see
what is free?


I'd answer "no, not at all like that".

You (the PC-owner-to-be) have to have reserved a linkage index (LX, via LXRES). The LX 
defines the "left part" of the PC number.
You define/create the entry table and associate it with the LX (ETDEF, ETCRE, ETCON). The Nth entry 
(0-origin) in the entry table would correspond to a PC number with N as the "right part". 
N is the "Entry Index" (EX).

A number is "free" if your entry table does not have enough entries to reach 
that number.

The extended addressability guide is your friend.

Peter Relson
z/OS Core Technology Design


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


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


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


Re: Some questions on SYSCALL

2022-06-29 Thread Seymour J Metz
I don't have a problem with checking return codes, but IMHO the SIGNAL 
statement is badly broken and the handling of exceptions is much better in, 
e.g., Ada, Java, PL/I.


--
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 6:38 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

 REXX isn't so simple after all! You would have been better off
writing your code in Java, or if you have installed the new Open XL
C/C++ compiler/runtime you could use the C++17 filesystem library.

To me, just having to check return codes instead of relying on
exceptions is a good enough reason to dodge REXX.

On 29/06/2022 6:32 am, Charles Mills wrote:
> 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%7C2fc89587f8af44acab6c08da5956feba%7C9e857255df574c47a0c00546460380cb%7C0%7C0%7C637920527431418524%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=s%2FuaSVSV3PGhnejqfV6Lmvk7Vtcdw5aBHneKg5LIYUw%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.
>

--
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
You can invoke a command either with an explicit environment or with an 
explicit environment. An address statement with only one operand changes the 
current (implicit) environment, but it does cause any environment to go away. 

There is no PEN environment; you need address SYSCALL "open" filename.

I don't understand the -3; The open should not be changing the current 
environment. I would open an incident with IBM.



--
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:50 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

And another question: what makes ADDRESS SYSCALL "go away"?

I would post more context but I don't know what the relevant bit is. (If I knew 
then I wouldn't be asking!)

I do SYSCALLS("ON")
I do ADDRESS SYSCALL
I do "open" filename etc. Not ADDRESS open, just "open" filename ...

That all works. Subsequently I do "write" etc. and it fails with a -3. If I go 
back and precede it with ADDRESS SYSCALL then it works. What has made ADDRESS 
SYSCALL "go away"? What I do NOT do

- I don't do any other ADDRESS in the Rexx. I checked with the editor.
- I don't invoke any other Rexx

What I do do is call an assembler routine. I just got through writing the 
assembler, so I can tell you that it does not do any IRXx functions or 
anything cute like that. It does not "mess with" Rexx at all. It picks up one 
argument and returns 30 bytes or so of result. Does calling out to an assembler 
program inherently reset ADDRESS? The assembler is an alias in a load module in 
STEPLIB; there is no "function package."

Charles


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Charles Mills
Sent: Tuesday, June 28, 2022 3:33 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%7Cd91879481bd749a27b7d08da5958a5ff%7C9e857255df574c47a0c00546460380cb%7C0%7C0%7C637920534531244150%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=zzPxpUykOrgShTdAa9dVP1GDRqloEBdNNhkKdD%2Fh80E%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

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


Re: zVM v7.1 : Populating VMSYS: Root BFS

2022-06-29 Thread Jasi Grewal
Hi, I just picked up zVM support after skipping for many years and experiencing 
an odd BFS issue.   
   - We need to populate VMSYS root and it seems that loadbfs does not perform 
it anymore.
   - I tried from starting with scratch SFS system: 
   - Then using bfsroot - loadbfs bfs loadbfs and gskssldb from Maint 193 
   
   - It creates directories within Root but does not populates it.
I made sure that the directories has correct owners and uid's and I remember 
that this used to work on z/VM v5.3.

Any guidance would be appreciated.Thank You in advance,
Regards,Jasi.

--
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
See z/OS 2.5 TSO/E REXX Reference, SA32-0972-50. There are three ways to write 
an assembler routine. The first two are almost identical and have access to 
services documented in Chapter 12. TSO/E REXX programming services at 
,
 have the interface documented in External functions and subroutines, and 
function packages at 
.

 1. As a REXX function; it receives parameters in R0 and R1, and is responsible 
for returning a string to REXX as a result. You can also invoke it with a REXX 
call statement.

 2. As a REXX callable routine; same as 1, except it does not pass a result.

 3. As a command; the interface depends on the environment in which it is 
invoked. Some environments are documented in Commands to external environments 
at 
.

None of these change the current environment.

An address TSO statement just makes SYSCALL not the current environment but 
SYSCALLS("OFF") actually makes the SYSCALL environment unusable until another 
SYSCALLS("ON").



--
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 7:03 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

It would be nice if the USS people would get their command environment
built in to REXX, like TSO, etc.  Yeah, I can't imagine anything
syscalls(on) could do that's worth being undone.  But I doubt that's the
problem.

Calling an assembler routine certainly doesn't inherently reset the command
environment, but how exactly is it invoked?  It could be set up as an
external routine, which doesn't care about the environment, or you might
use address LINKMVS or something.  Of course you said you didn't.

Barring another address statement, I see no reason why the SYSCALL
environment should get lost.

sas

sas


On Tue, Jun 28, 2022 at 6:55 PM Ed Jaffe 
wrote:

> On 6/28/2022 3:50 PM, Charles Mills wrote:
> > And another question: what makes ADDRESS SYSCALL "go away"?
>
> Years ago on MVS-OE we were advised by Bill Schoen not to attempt
> SYSCALLS("OFF").
>
> Once you turn it on, leave it 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


Re: Allocating PC numbers

2022-06-29 Thread Peter Relson

how do you determine
what PC number the new routine is going to use? Is there a list of
'used' ones somewhere? Are, do you do some sort of loop checking to see
what is free?


I'd answer "no, not at all like that".

You (the PC-owner-to-be) have to have reserved a linkage index (LX, via LXRES). 
The LX defines the "left part" of the PC number.
You define/create the entry table and associate it with the LX (ETDEF, ETCRE, 
ETCON). The Nth entry (0-origin) in the entry table would correspond to a PC 
number with N as the "right part". N is the "Entry Index" (EX).

A number is "free" if your entry table does not have enough entries to reach 
that number.

The extended addressability guide is your friend.

Peter Relson
z/OS Core Technology Design


--
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
Not quite; SYSCALL is no longer the current (i.e., implicit) environment but it 
is still available as an explicit environment:

address TSO
address SYSCALL foo
/* TSO is still the current envirenment */


--
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: Tuesday, June 28, 2022 7:04 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Some questions on SYSCALL

On Tue, 28 Jun 2022 15:55:20 -0700, Ed Jaffe  wrote:

>On 6/28/2022 3:50 PM, Charles Mills wrote:
>> And another question: what makes ADDRESS SYSCALL "go away"?
>
>Years ago on MVS-OE we were advised by Bill Schoen not to attempt
>SYSCALLS("OFF").
>
>Once you turn it on, leave it on...
>
Good memory, but wrong question.

address TSO /* makes ADDRESS SYSCALL "go away".  */

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


is there any documentation on using the new 64 bit instructions?

2022-06-29 Thread Colin Paice
Thanks for all of the comments.  I had some offline as well as online.

I found John R. Ehrman's book very interesting, a bit of bedtime reading.

I called my code using #PRAGMA LINKAGE(xxx,OS), and did not need to worry
about XPLINK.

Because the z/OS routines I was using are 31 bit, I needed to get storage
it could address so, I in my 64 bit program, I used

char * __ptr32 Data =   (char *) __malloc31(1024);

My question about needing BSM is due to C using BALR to branch to code!
I'll blog some of my lessons learned.

I've managed to run Python as a started task, and respond to the
operatorSTOP and modify requests,  for example "F PYTHJOB,'my data'"

If anyone is interested in this, please contact me offline.

I'll investigate the use of C - and David Crayford's __ASM__solution -
thank you.

Colin

--
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
Sme, but manageable. The article Safe REXX at 
 and 
 has some tips on avoiding 
REXX pitfalls.



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