RENT
A program compiled as RENT
is generated
as a reentrant object program. A program compiled as NORENT
is
generated as a nonreentrant object program.
Either a reentrant or a nonreentrant program can be invoked as a main program or as a subprogram.
Default is: RENT
Abbreviations are: None
DATA
and RMODE
settings: The RENT
option
interacts with other compiler options that affect storage and its
addressability. Use the DATA(24 | 31)
option for
reentrant programs to control whether dynamic data areas are allocated
in unrestricted storage or in storage obtained from below 16 MB. Compile
programs with RENT
if they will be run in virtual
storage addresses above 16 MB.
Execution
of nonreentrant programs above 16 MB is not supported. Programs compiled
with NORENT
must be RMODE 24
.
The setting of the DATA
option
does not affect programs compiled with NORENT
.
For information about which Enterprise COBOL programs need to be reentrant, see the related task about making programs reentrant.
Link-edit
considerations: If all programs in a program
object are compiled with RENT
, it is recommended
that the program object be link-edited with
the RENT
binder (linkage-editor) option.
Use the REUS
binder (linkage-editor) option
instead if the program object will also contain
any non-COBOL programs that are only serially reusable.
If any program in a program object is
not reentrant, the program object must
not be link-edited with the RENT
or REUS
link-edit
attributes. The NOREUS
binder (linkage-editor) option
is needed to ensure that the CANCEL
statement will
guarantee a fresh copy of the program on a subsequent CALL
.
Making programs reentrant
DB2® Application Programming and SQL Guide (Using reentrant code)