At my recent site, we wanted all programs to be naturally reentrant
for several reasons ... no matter, if PL/1, ASSEMBLER, or C.
With the old compilers, we achieved this by telling the developers that the
STATIC variables must not be changed during execution. We had some
test systems that allowed for runtime checks (storage protecting the
module area, and then monitoring the 0C4 abends resulting from
stores into the module area).
With the new PL/1 compiler, we can enforce this by assigning implicitly
NONASSIGNABLE to all STATIC definitions; this is a sort of additional
If sometimes for special reasons, there is a need to store some information
into the static area, the variables have to be defined explicitly with the ASGN
One such reason could be:
The module stores the parameters of the last call and the results in the
STATIC area, and if the parameters on the next call are the same,
it simply outputs the result, without computing again. Of course, you
have to take care that this works correctly in a multi-threaded environment.
Am 17.01.2015 um 18:36 schrieb J.G.:
> Note also that the chief value of the PL/I attributes ASSIGNABLE and
> NONASSIGNABLE is in the characterization of procedure parameters.