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 <http://www.rexxla.org/Newsletter/9812safe.html> and <http://www.rexxla.org/Newsletter/9901safe.html";> has some tips on avoiding REXX pitfalls.

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

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



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

Reply via email to