You could still use a MetalC “front end” to both capture R0 and establish the LE/C++ environment via CEEPIPI, saving addresses and/or data as needed in a writeable static area, and on subsequent calls just invoke the C++ code to execute the needed functions.
Then your Rexx calls would use the least amount of environment setup and teardown. The down side is you would also need a “terminate” function in the “front end” to do the needed CEETERM for the LE/C++ environment you set up which the invoking Rexx code would then need to call before exiting. Peter From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of Charles Mills Sent: Thursday, November 16, 2023 11:44 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: External Functions in C on z/OS The function not provided by Metal C is basically all of C++. The called module is written in, and exploits, C++. Charles On Wed, 15 Nov 2023 21:26:18 +0000, Farley, Peter <peter.far...@broadridge.com<mailto:peter.far...@broadridge.com>> wrote: >OK, I sort of understand the “personal preference” about not using inline >assembler (it is kludgey, I agree) and somewhat understand the concern about >the “unsupported” aspect of retrieving register contents at entry, but if that >is the case why not use MetalC where you have much more control of the entry >and exit logic, and could easily provide your own version of the prolog that >guaranteed access to the contents of R0? Is there some C library routine that >is not provided by MetalC that you would need in your Rexx external function? -- 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