__cinit returns an environment token which is stored in R12. It's not unusual to have environment pools in both metal/c and LE using PIPI.
On 20/09/2012, at 11:00 PM, "Farley, Peter x23353" <[email protected]> wrote: > In thinking about a possible Metal C project, I realized I might have to LINK > to other Metal C main programs as part of the project. My concern in this > OCO environment is whether this scenario is safe to plan: > > EXEC PGM=A > __cinit > (Program A logic) > LINK to program B > __cinit > (Program B logic) > __cterm > RETURN to program A > (Program A more logic) > __cterm > RETURN to z/OS > > My first question is whether the Program B invocation of __cinit will succeed > since __cinit was already called by Program A. > > If the answer to the first question is Yes, then my second question is > whether the (Program A more logic) section would succeed or fail using the > Metal C runtime routines after the LINKed-to program B calls __cterm. > > TIA for any practical experience or advice you can provide. > > Peter > > > 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 ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
