> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
> Behalf Of Shmuel Metz (Seymour J.)
> Sent: Wednesday, October 25, 2006 7:22 AM
> To: [email protected]
> Subject: Re: Is the teaching of non-reentrant HLASM coding practices ever
> defensible?
> 
> In <[EMAIL PROTECTED]>, on 10/22/2006
>    at 08:31 PM, "Jeffrey D. Smith" <[EMAIL PROTECTED]> said:
> 
> >No, that's reentrant.
> 
> RYFM.
> 
> >Refreshable means the program does not
> >modify itself *ever*.
> 
> No. It means that the program produces correct results even if
> refreshed. It can modify itself as long as losing the modifications
> doesn't cause incorrect results.
> 
> A program is reentrant if it produces correct results when multiple
> invocations run concurrently. A R/O program can fail to be reentrant,
> and a reentrant program can modify itself. It can even modify itself
> without serialization if it does not subsequently rely on the results
> of the modification.
> 
> >No, reentrant means what I wrote.
> 
> RYFM.
> 
> >Serialization has nothing
> >to do with it, unless the program is self-modifying (which is also
> >what I wrote).
> 
> That's what you wrote, but it's wrong.
> 
>      L     R0,CVTUSER
>      BCTR  R0,0
>      ST    R0,CVTUSER
> 
> Refreshable, in fact R/O, but not reentrant; it needs serialization.
> 
> "It's not what you don't know that's the killer; it's what you know
> that isn't so."
> 
> --
>      Shmuel (Seymour J.) Metz, SysProg and JOAT

IBM Documentation, "Program Management" SC27-1130-00
Chapter 7, Binder Options, Page 123.

The syntax of the REUS option is as follows: 
REUS={NONE|SERIAL|RENT|REFR} 
The reusability values are: 

NONE 
The module cannot be reused. A new copy must be brought into virtual 
storage for each use. NONE is the default value.
 
SERIAL The module is serially reusable. It can only be executed by one task
at a time; when one task has finished executing it another task can begin. A
serially reusable module can modify its own code, but when it is reexecuted
it must initialize itself or restore any instructions or data that have been
altered. 

RENT The module is reenterable. It can be executed by more than one task at
a time. A task can begin executing it before a previous task has completed
exe-cution. A reenterable module cannot modify its own code. In some cases,
the operating system may load a reentrant program into an area of virtual
storage that cannot be modified. 
Reenterable modules are also serially reusable. 

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. 
The refreshable attribute can be specified for any nonmodifiable module.


Jeffrey D. Smith
Principal Product Architect
Farsight Systems Corporation
700 KEN PRATT BLVD. #204-159
LONGMONT, CO 80501-6452
303-774-9381 direct
303-484-6170 FAX
http://www.farsight-systems.com/
comments are invited on my encryption project

----------------------------------------------------------------------
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

Reply via email to