On 7/19/2011 10:18 PM, Schumacher, Otto wrote:
REENTRANT Program: Re-entrancy is a useful, memory-saving technique for multiprogrammed timesharing systems. A Reentrant Procedure is one in which multiple users can share a single copy of a program during the same period. Reentrancy has 2 key aspects: * The program code cannot modify itself. * The local data for each user process must be stored separately. Thus, the permanent part is the code, and the temporary part is the pointer back to the calling program and local variables used by that program.
I hate to quibble, but it's not true that the program code "cannot" modify itself. As you noted, local data are stored separately, and could, for instance, contain an ENQ parameter list. The module could do an exclusive ENQ, change itself, do something else, change back, and release the ENQ, and still satisfy all conditions of re-entrancy.
REFR The module is refreshable. It can be replaced by a new copy during execution without changing the sequence or results of processing. A refreshable module cannot be modified during execution. A module can only be refreshable if all the control sections within it are refreshable. The refreshable attribute is negated if any input modules are not refreshable. Refreshable modules are also reenterable and serially reusable.
A module may be refreshable, but need not be re-entrant. This has been discussed before.
Gerhard Postpischil Bradford, VT ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

