Great! Time to update. Do you know whether that version will be in openSUSE LEAP 15.4, which is now in beta?
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List [[email protected]] on behalf of Rony G. Flatscher [[email protected]] Sent: Wednesday, March 9, 2022 2:03 PM To: [email protected] Subject: Re: Rexx copy to OMVS On 09.03.2022 18:01, Seymour J Metz wrote: > Yes, "mycmd myopts" is an expression that evaluates to the command string. It > could as well have been a single variable, a literal or a more complicated > expression. > > Yes, it's synchronous. Alas, OOREXX doesn't have the ANSI address syntax and > Regina doesn't have multitasking. ooRexx 5.0 got the ANSI address syntax added to it, here an example: say "demonstrate ANSI REXX in ooRexx 5.0 ('ADDRESS ... WITH ...')" parse version v say "version:" v say say "sorting a stem using the operating system 'sort' command:" /* define the stem array */ in.1="Zeppelin" in.2="berta" in.3="Anthony" in.0=3 cmd="sort" /* operating system command 'sort' */ address system cmd with input stem in. output stem res. do i=1 to res.0 /* iterate over all stem elements */ say i":" res.i end say "---" say "sorting an array using the operating system 'sort' command:" /* define the array */ names=.array~of("Xavier", "New York", "caesar") arrOut=.array~new /* create array to fetch stdout */ address system cmd with input using (names) output using(arrOut) do i=1 to arrOut~items say i":" arrOut[i] /* iterate over all array elements */ end The above program runs on Windows and Unix as these operating systems possess a 'sort' command, here the output running the above program on Windows: G:\tmp\orx\address>test.rex demonstrate ANSI REXX in ooRexx 5.0 ('ADDRESS ... WITH ...') version: REXX-ooRexx_5.0.0(MT)_32-bit 6.05 30 Jan 2022 sorting a stem using the operating system 'sort' command: 1: Anthony 2: berta 3: Zeppelin --- sorting an array using the operating system 'sort' command: 1: caesar 2: New York 3: Xavier This is really a great feature, students love it as it dramatically simplifies running commands and redirecting stdin, stdout and stderr from/to stems, streams (files) and collections (like arrays in the above example). ---rony > ________________________________________ > From: IBM Mainframe Discussion List [[email protected]] on behalf of > Paul Gilmartin [[email protected]] > Sent: Wednesday, March 9, 2022 11:47 AM > To: [email protected] > Subject: Re: Rexx copy to OMVS > > On Wed, 9 Mar 2022 16:26:36 +0000, Seymour J Metz wrote: > >> address SYSTEM mycmd myopts WITH INPUT foo OUTPUT FIFO >> address SYSTEM mycmd myopts WITH INPUT foo OUTPUT STEM bar. >> address SYSTEM mycmd myopts WITH INPUT foo OUTPUT STEM bar. ERROR APPEND baz >> > Each of those is synchronous, not returning control to the Rexx scriipt > until "mycmd myopts" terminates, not suitable for a long-running command. > > (Isn't myopts merely part of the command string?) > >> Why won't popen let you redirect both stdin and stdout? Or all three? >> > Desirable, but entailing synchronization problems unless Rexx were > also to provide the lacking SYSCAL SELECT: > > <https://secure-web.cisco.com/1DRefECC2oZAuUy07BTqqULOi5BWpTRjE1YzaoJUi5iQr-m4qNgCXBzb6ahZOYtX9F59cqxdALciiFBYa7quyrppYYEeL3up7VXSvvnQfjq_o8s8xLHENi9HZnmhX1rBuL8EUQY7Wk6x0IZX3d5-764g4NmxyYmdFBaE1UmQxHkvnCC4cc3zt6gjxAeUe7SSNyu0OJdnvqSwIcsV48N1MjLRTFCleqf6baummYarH56QP8WhHTpq-xlPhKORcxW8Ikl_E_NuCYecqqifnA_64r67FxAdVteXrUX9EQSS5weZocA_ksSLYSommj6HNNYZQ-TJEv3yKJKERWooOVZxipkRCJ9r73WUrDLYb790Vac2LhmyURyssBevH43YclAsXuKFXEzaVOHSKaZEUIIDJi3WWmZ5E5IlCx5zL_VYgMa7XVVjVbJ0XpJWtebtYkc6B/https%3A%2F%2Fpubs.opengroup.org%2Fonlinepubs%2F9699919799%2Ffunctions%2Fpselect.html%23tag_16_400> > >> ________________________________________ >> From: Paul Gilmartin >> Sent: Wednesday, March 9, 2022 10:47 AM >> ... >> OTOH, I know of no other Rexx with the facility of z/OS STREAM POPEN: > -- > gil > ---------------------------------------------------------------------- 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
