> REXXTRY is roughly to REXX what csh is to C. ?
csh does not read C statements and execute them; it's a scripting language. REXXTRY is not a scripting language, although it is a great convenience for the REXX programmer. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List <[email protected]> on behalf of Hobart Spitz <[email protected]> Sent: Monday, July 9, 2018 3:20 PM To: [email protected] Subject: Re: REXX as JCL replacement Steve, thanks for the kind words. One afterthought that might improve the use of the TSO PROC, if one is so inclined. Use // EXEC TSO,CMD=REXXTRY , Put REXXTRY into one of the SYSEXEC/SYSPROC libraries, if it's not already there. It gives access to most of REXX to the SYSTSPRT records. REXXTRY is roughly to REXX what csh is to C. If you don't have REXXTRY, you can find the source on the web. I would recommend one of the IBM versions. For example (untested): 1. *//MYJOBNAM JOB (acct),'M.E.SMITH',MSGCLASS=t,...* 2. *// JCLLIB ORDER=(MY.JCL.LIB) Optional* 3. *// EXEC TSO,CMD=REXXTRY* 4. *//SYSTSIN DD * Recommended DD to avoid conflicts with SYSIN use.* 5. *Trace = "e" /* Unique to REXXTRY. Show error commands. You may prefer "c". */* 6. *"profile"* 7. *call outtrap "Lines."* 8. *"st myjobname"* 9. *call outtrap "off"* 10. *parse var Lines.1 "(" JESNum ")" /* cutting some corners here in interest of brevity */* 11. *"%myrexpgm"* 12. *OutDSN = "out.data(results)"* 13. *DSStat = sysdsn(OutDSN)* 14. *if DSStat == "OK" | DSStat == "MEMBER NOT FOUND" then **DSOptions = "shr"* 15. *if DSStat == "DATASET NOT FOUND" then **DSOptions = "new catalog cyl space(10 10) dsntype(library)"* 16. *if var("DSOptions") == "LIT" then do;** say time() Lines.1 OutDSN "-" DSStat; **exit 20; **end* 17. *"alloc reuse dd(sysut2) dsn("OutDSN")" DSOptions* 18. *if RC <> 0 then exit RC* 19. *"alloc reuse dd(sysin) dummy"* 20. *"alloc reuse dd(sysut1) shr dsn('my.in.data')"* 21. *"call *(iebgener)" /* Trace = "e" reports failures; GENER stops if SYSIN/SYSUT1 missing/invalid. */* 22. *"free dd(sysut2, sysin, sysut1)"* 23. *//* Here we can use SHR with our output PDSE if it already exists. You must put ALLOCs, TSO CALLs, FREEs, and any other commands with parentheses or characters that REXX is sensitive to, in quotes or quotation marks. Quotation marks ( " ) are prefered if you have fully qualified dataset names with quotes. See line 20. Lines 12 thru 18 could form the basis of a common, external routine, since it may be needed often. Personally, I think this approach is so much better that I might set REXXTRY as the default &CMD value in the PROC. On the other hand, you don't have multil-line commands, continuations, the ability to supply internal routines or SIGNAL handlers, so at some point it becomes preferable to make a long sequence of commands into a program of its own. Maybe this is what a JCL replacement could look like. Add in some commands for compatibility (e.g. JCL DD, JCL STEPEXEC, JCL SET, etc.), and things look rosier and practical. Caution: DD DDNAME=... and "alloc ddname(...)" are two completely different animals. OREXXMan JCL is the buggy whip of 21st century computing. Stabilize it. Put Pipelines in the z/OS base. Would you rather process data one character at a time (Unix/C style), or one record at a time? IBM has been looking for an HLL for program products; REXX is that language. On Mon, Jul 9, 2018 at 12:56 PM, Steve Smith <[email protected]> wrote: > I'd like to point out that Hobart Spitz's long post is a great overview of > the practical and useful way that at least some JCL could be replaced with > REXX. The details can be nit-picked eternally (and no doubt will be). > > sas > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
