Making programs reentrant
If more than one user will run an application program
at the same time (for example, users in different address spaces accessing
a program that resides in the link pack area), you must make the program reentrant by
compiling with the RENT
option.
About this task
You do not need to worry about multiple copies of variables. The compiler creates the necessary reentrancy controls in the object module.
The following Enterprise COBOL programs must be reentrant:
- Programs to be used with CICS®
- Programs to be preloaded with IMS
- Programs to be used as Db2® stored procedures
- Programs to be run in the z/OS UNIX environment
- Programs that are enabled for DLL support
- Programs that use object-oriented syntax
For reentrant programs, use the DATA
compiler
option and the HEAP
and ALL31
runtime
options to control whether dynamic data areas, such as WORKING-STORAGE
,
are obtained from storage below or above the 16 MB line.