Hello,
we are trying to convert a PLX program in a PL/I one due to no more supported
PLX DB2 SQL precompiler for the CAF interface we are using.
Now, in doing this, we need to load in storage only one time the DSNHLI2 module,
store its address and in the subsequent called programs use this address to be able to
call DSNHLI2.
in PLX this is realized by using
PROGRAM A
=========
?load ep('DSNHLI2') erret(alierr);
alierr:;
rfy (r0,r15) rstd;
rc15 = r15;
dsnhli2P = r0; <======= address
rfy (r0,r15) unrstd;
then PROGRAM A call program B and pass as parameter the loaded address dsnhli2P
in this way PROGRAM B can declare DSNHLI2 as follows:
PROGRAM B
==========
DSNHLI2 entry based(dsnhLI2p) é CAF interface routine
valrg(*);
and can call it without need to load:
call DSNHLI2(plxsql);
Now, reading the PL/I manual I was thinking that the corresponding way to do this
would be to use the FETCH ... but it s is not clear to me how can I declare in PROGRAM B
the external procedure so that it is based on a passed pointer.
I know LOAD works in PLX, so that even if more times LOAD is called with no DELETE
this si not an error and only one copy is saved n storage while a counter is increased,
so that only when a corresponding number of DELETE is done the module is removed
from storage. But I have no idea how FETCH works in this case.
Couls someone help me to understand how can load dynamically an external module and
then call it is subsequent called external procedure call this load module using the
passed load address?
Could someone help me to understand how FETCH works and what happens if I do more FETCH
without RELEASE?
The problem is that we should not do FETCH CALL RELaESE all time as these procedures are
invoked 50000, 1000000 times in our batch program and could affect performance
loading and removing each time from storage a module.
thanks a lot for all the help you could provide me
ciao
Rossella
RoxDonadeo