Rajat Sharma
Member
Hello everyone, hope you all are well!
It’s difficult for me to visualize the complete picture of persistent/super procedures. I read relevant past threads and docs but still have few doubts.
· If I run an external procedure as persistent then an instance of that procedure is created in memory (understood). Does any procedure (.p program within the same session) can access any of the internal procedure or function (define in persistent procedure) or only the calling procedure that run the procedure as persistent can only allow to do that. I tried doing that and I think only the calling procedure (with RUN proc.p PERSISTENT statement) could access internal procedure/function but I also think that all internal procedures (those are persist in memory) should be accessible to all procedures (all .p programs within the session), please confirm and share any relevant example elaborating the same.
· I read the docs but it’s difficult for me to understand the handle chains in persistent procedures. Does the chain of handles means chain of internal procedures/functions (within persistent procedure), if yes then for 10 internal procedures (in persistent procedure) there are 10 handles maintained in memory (really confusing).
· Super procedures works the same way as persistent procedures but they depend on call stack (instead of creating instance of persistent procedure in cache block). If yes then
1. Persistent procedure don’t use call stack?
2. Where call stack exist, isn’t it a part of memory?
3. Does persistent procedure means that referring instance (set of internal procedures or functions) from memory and super procedure means that referring to call stack regarding the same. If yes, then which one is better?
4. If both could work for the same purpose then which one should we use or and why.
Please suggest.
Thanks & Regards!
Rajat.
It’s difficult for me to visualize the complete picture of persistent/super procedures. I read relevant past threads and docs but still have few doubts.
· If I run an external procedure as persistent then an instance of that procedure is created in memory (understood). Does any procedure (.p program within the same session) can access any of the internal procedure or function (define in persistent procedure) or only the calling procedure that run the procedure as persistent can only allow to do that. I tried doing that and I think only the calling procedure (with RUN proc.p PERSISTENT statement) could access internal procedure/function but I also think that all internal procedures (those are persist in memory) should be accessible to all procedures (all .p programs within the session), please confirm and share any relevant example elaborating the same.
· I read the docs but it’s difficult for me to understand the handle chains in persistent procedures. Does the chain of handles means chain of internal procedures/functions (within persistent procedure), if yes then for 10 internal procedures (in persistent procedure) there are 10 handles maintained in memory (really confusing).
· Super procedures works the same way as persistent procedures but they depend on call stack (instead of creating instance of persistent procedure in cache block). If yes then
1. Persistent procedure don’t use call stack?
2. Where call stack exist, isn’t it a part of memory?
3. Does persistent procedure means that referring instance (set of internal procedures or functions) from memory and super procedure means that referring to call stack regarding the same. If yes, then which one is better?
4. If both could work for the same purpose then which one should we use or and why.
Please suggest.
Thanks & Regards!
Rajat.