*** Comments and questions marked below.

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of David Crayford
Sent: Thursday, September 20, 2012 11:40 AM
To: [email protected]
Subject: Re: Metal C runtime safe for dynamic LINKing?

__cinit returns an environment token which is stored in R12. 

*** I am aware of that, since there is source coding required to support the 
use and reservation of R12 for the token.

It's not unusual to have environment pools in both metal/c and LE using PIPI. 

*** I do not understand this part of your reply.  I am well aware of the use of 
PIPI for LE programs to prevent repeated startup and teardown of the LE 
environment.  But what do you mean by "environment pools"?  And how do they 
relate to my question, please?

Peter

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

Reply via email to