There was recently a thread on the ASSEMBLER LIST regarding constructed
reentrancy vs. natural reentrancy using the RENT compile option with C, C++ or
PL/1.
I want to add, that RENT does not help with the initialization problems with
STAY RESIDENT YES. Even static storage in the WSA (in the case of RENT) is not
initialized again, if a resident stored proc is called a second time. This is
because the LE enclave is not restarted. So you have the responsibility to
re-initialize all your static variables on every call of the stored proc (or
better: use automatic variables, or: make your proc naturally reentrant - and if
you do so, there is no need to use the RENT compile option).
We code our stored procs in PL/1 and use STAY RESIDENT YES. I tried to convince
the architects to compile with NORENT, but no success. As I pointed out above,
RENT doesn't help really.
Kind regards
Bernd
D.S. schrieb:
> 2 things to think about:
>
> 1. If you use STAY RESIDENT YES you need to be careful about initializing
> storage at the beginning of a procedure (should be doing this anyway) since you
> will be reusing a previous call's environment.
>
> 2. When you recompile code you will need to do WLM Refreshes of the stored
> procedure environment to pick up the new code since it isn't being loaded every
> time.
>
> If you are in a high speed environment you should notice a significant
> performance improvement by using STAY RESIDENT YES.
>
|