Sure, as long as the called program Is prepared to access the Rexx variable 
argument in which to read or return the address value.  Alternatively, I 
suppose you could try to set the return code to the address of the obtained 
storage, but I am not sure the whole value would survive unless Rexx NUMERIC 
DIGITS was high enough.  Might be worth a try though.

Using ADDRESS MVS or ADDRESS LINKMVS doesn’t keep the executed program loaded.  
Ideally you would like to have something like ADDRESS KEEPMVS in place of 
LINKMVS or MVSKEEP in place of MVS (or any better naming convention you prefer, 
I just made those names up in the moment).
Peter

From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Paul Gilmartin
Sent: Saturday, February 28, 2026 4:19 PM
To: [email protected]
Subject: Re: Is anyone familiar with CEEPIPI (LE pre-initialization)?


On Sat, 28 Feb 2026 18:26:39 +0000, Farley, Peter  wrote:



>Charles, you will need two levels to accomplish this from Rexx.  First you 
>need a Rexx function or ADDRESS mode package written in assembler or MetalC 
>that will load and call your C code the first time, using CEEPIPI to 
>initialize the C environment, and save the entry point address and the address 
>of the GETMAIN'ed CEEPIPI area in the user area of one of the Rexx control 
>blocks or in a saved named whatchamacallit (I forget the macro name – the z/OS 
>mechanism behind CICS named counters) for subsequent calls.  And for 
>completeness you'll probably need an "exit" call as well to clean up the 
>loaded code and dynamic storage before Rexx termination.  Something like the 
>equivalent of a C "atexit()" function.

>

>The problem is that z/OS Rexx has no concept of a “load this external function 
>once and call the same copy the next time”.  It sure would be nice if someone 
>wrote generalized "loaded function" glue code for z/OS Rexx and contributed it 
>to CBT, but sadly we do not have that yet.

>    ...

Could the C or Assembler refreshable  function keep any needed

persistent data in Obtained storage and return the address of

such a block to REXX?



--

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 [email protected] with the message: INFO IBM-MAIN

Reply via email to