You invoke ISPF. You call a REXX script for ISPF. The script does ADDRESS ISPEXEC foo and ISPF gets control back. It's well documented in the TSO/E REXX Reference, and other implementations have essentially the same API. Basically, when a REXX-aware application creates an environment, REXX associates context with the environment name; when a REXX script routes a command to that environment, the environment block contains the context so that the application can locate its control blocks. It's quite elegant, and REXX does all of the heavy lifting.
On the flip side, prior to OREXX everything was a string; there was no type checking, only value testing. Also, the exception handling is fragile compared to PL/I, Python or Ruby. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of David Crayford [dcrayf...@gmail.com] Sent: Wednesday, June 23, 2021 8:57 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Coding for the future Maybe I'm missing a subtlety here but can you demonstrate how REXX uses callbacks on z/OS? I'm familar with command environments, I've written one for REXX regex https://secure-web.cisco.com/140q8fxdqURUGvmth2nK_lOrDPN09AtW0cBfgGnzMZm6MOvOho-HriWxdOrBSwiPotV2P6kacF9rpRwTORQsYeHqbOlnMFxHuUDYsjYnWlk0z0sR7CYhLEzIyd-DL6yuI6IRotLmLhmT3RbCQk9-VO0E6-NE3tyAdm1jgxYV9K6GosVOwG_tqv0j_Iv7TeRrCoUvhQ5ZNmnH2N9gR8CjU9xFydEZWlX1Y702G19rTTW9fV0qRkhU5kTGg16f16KMPIZbaB7Cqk0evdWJylMOkSMkIA5PECEmFeyiQXvrOBE2LDvGMC16AK6OZg5xdnzeWpSgm_g5F-nCgOQjteQ_82RUkquwXW_WqLZq0S0yXoz4PpyFEFJrpl2iZboK4FhuXZdrvui3BqiSrz0nKNJYIXUNRpVzfCH02p2xcc1Oqa0Lrndw3QSeal5ZFf3sRqGP-/https%3A%2F%2Fgithub.com%2Fdaveyc%2FRTK. In Python, Lua etc you would just create an instance of a class an communicate using message passing like any OO language. For example, to create and ISPF in Lua you instantiate and ISPF object and then communicate with it by calling methods https://secure-web.cisco.com/1qsEFCKQQ8_UfI8nvAPUHIHUMRsk8zVcv8tyCsWKzPB5x6Iqcinh6eFRTvMYUE_fu4U_RlstYoTVGhhME8x92IIYlUFy0AvsQ_osnJyM5U0ASEu77n43wTA2l6-3XA99vaRmgsICvmmQW_Wlc1RO5W5SsL6uXFqvGMNSV5d2Swy6V131ckAPNDw9a-BsfYVkO5DRvOINNh9iJZqVw466fpXNjZh1CsFmaMQcpIvnXTnndqgbQwZw4yzPuxvmWTf__4ssShTUeQnjYxO6gcW4YsvpHhQslzGOP7V45e2SIHjYK3A2EGLp3hyelRfJG9gh3h0qFBX_1a5X08xba0wB0HwMXf4VyHIzAvI5LKoqvrMA90FsZq4h6TMxefXsiXKHALdxZV9djrJXqln73WhSCoaNFiVgG9C-wOFEwYW7bB12UrfhpL6v1ZJ3Hxudjq_4kHxQJuH7g6y4Brb90haU3vA/https%3A%2F%2Flua4z.github.io%2FLua4z%2Fmodules%2Fispf.html. On 23/06/2021 7:04 pm, Seymour J Metz wrote: > Allow applications to establish environments for scripts (ADDRESS) , allow > call-backs from within scripts and access the variables of the scripts. I > wish that I could do that from within Perl, although I'd take the time to > learn Python or Ruby if they supported that. > > > -- > Shmuel (Seymour J.) Metz > http://mason.gmu.edu/~smetz3 > > ________________________________________ > From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of > David Crayford [dcrayf...@gmail.com] > Sent: Wednesday, June 23, 2021 3:19 AM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: Re: Coding for the future > > On 23/06/2021 10:38 am, Seymour J Metz wrote: >> None of those are relevant to what REXX does best. Again, it's the plumbing, >> not the syntactic sugar. > What exactly does REXX do best? What does it do better than Python? > > >> As to large applications, I believe that there are some pretty big ones in >> Perl and REXX, so why should I be surprised by large applications in, e.g., >> Python, Ruby? >> >> >> -- >> Shmuel (Seymour J.) Metz >> http://mason.gmu.edu/~smetz3 >> >> ________________________________________ >> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of >> David Crayford [dcrayf...@gmail.com] >> Sent: Tuesday, June 22, 2021 7:25 PM >> To: IBM-MAIN@LISTSERV.UA.EDU >> Subject: Re: Coding for the future >> >> On 22/06/2021 10:19 pm, Seymour J Metz wrote: >>> It's not a question of what environment it can run in; it's a question of >>> what facilities it supports in those environments. >> Indeed. Lua supports TSO, ISPF, CICS, IMS, the full MVS file system >> including VSAM. DB2 SQL + a SQLite API. A date/time module that supports >> dates that are greater than Mon Jan 01 1000000 BCE 00:00:00 and less >> than Mon Jan 01 1000001 00:00:00 etc, etc. >> We presented at SHARE where we demonstrated how to use Lua integration >> to convert a 3270 CICS BMS application to a mobile web app >> https://secure-web.cisco.com/1LTRemd3KBmC5tUUKSeo9EC5h9xyRF7Bz3PhdCSMXFnXeU9xUYZAMVe5chb0ZaeK3DMtRGm6fXidrWX-DdewRuiBFuunmJgylrBSK2m0dxTkBwteMqPfIErfpIkx2t0yKE_X4Vvjo2z5bwL3x5Gzol57ueWGXt0mRa5LkbagnGSXpBSeh0a0sqCHTv7dZ_yP7bvWRZEdnEhIKqF6yOijhnDFn7l75N3TqnoUwxHNnsOFWy_ZGihMqSRgOpFgNGT29c3jEMR9BWE6SwalS5Fq9qCm5mI3QT3QGXbhUjO6A4bL_zu9qSlFAFZM7PJeBTr73ngdhubfDFqh0fRWaFg5cyBhzcMGUTVbEV5QWTr76UNB_zRihnfVeyioclr2jou2HVmP2A7PlvHHZDFG0y1o-fR5mEjE0DxE6Jrzclf2Oy-W2TISt9m1rarhndnanZuca/https%3A%2F%2Fshare.confex.com%2Fshare%2F123%2Fwebprogram%2FHandout%2FSession15892%2F15892%2520Mobile%2520CICS%2520Application%2520Using%2520Lua.pdf. >> >> I spent a lot of time making sure Lua integrated well into the TSO/MVS >> environment. The irony is I spend very little time in TSO/ISPF these >> days. I spend most of my time in a shell and switch the ISPF when I want >> to use SDSF. I write new scripting code in Python which is enhanced >> ASCII so only >> runs in z/OS UNIX. Rocket and IBM don't see any value in integrating >> ported tools with TSO as it's not strategic. The main focus is on >> containers. >> >> BTW, did you know that the photo sharing app Instagram is written in >> Python? It's staggering to imagine that what we would consider a >> scripting language is serving over 1 billion monthly users. >> >> >>> -- >>> 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 22, 2021 9:57 AM >>> To: IBM-MAIN@LISTSERV.UA.EDU >>> Subject: Re: Coding for the future >>> >>> On 22/06/2021 8:55 pm, Seymour J Metz wrote: >>>> What distinguishes REXX is not syntactic sugar but the plumbing that >>>> enables close coupling of scripts with applications. Lua is missing that. >>> Maybe. But I can't think of an environment that REXX runs in that Lua >>> can't. I could port Python to run in TSO if I had the time but it's a >>> heavy lift. IBM have ported golang now which is compiled. We've had a >>> look at it and it's interesting. >>> >>> ---------------------------------------------------------------------- >>> 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 ---------------------------------------------------------------------- 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