COBOL - Making programs reentrant



Desenvolvido por DORNELLES Carlos Alberto - Analista de Sistemas - Brasília DF. - cad_cobol@hotmail.com

COBOL - Making programs reentrant

Enterprise COBOL for z/OS, Version 4.2, Programming Guide


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.

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.


© Copyright IBM Corp.