Making your Fortran program reentrant

If you intend to have multiple users execute a Fortran program concurrently, make it reentrant by using the RENT compiler option. The object module produced by the compiler must then be separated into its nonshareable and shareable parts using the reentrancy separation tool.

The Fortran reentrancy separation tool is delivered under Language Environment, and with the exception of its name and the names of the cataloged procedures used to invoke it, its use and operation are the same as with the reentrancy separation tool provided by VS FORTRAN Version 2.
Table 1. Fortran reentrancy separation tool and Language Environment cataloged procedures
Fortran Member name Language Environment member name Content
AFBVSFST AFHXFSTA Fortran reentrancy separation tool
None AFHWRL Cataloged procedure to separate the nonshareable and shareable parts of an object module, and link-edit
VFT2RLG AFHWRLG Cataloged procedure to separate the nonshareable and shareable parts of an object module, link-edit, and execute

The Fortran reentrancy separation tool is a member of the CEE.SCEERUN data set. The Fortran reentrancy separation tool cataloged procedures are members of the CEE.SCEEPROC data set.

It is important to note that Fortran products from VS FORTRAN Version 1 Release 4 on produce reentrant object code; however, mixing Fortran object code with another HLL's object code can cause the other HLL's load module to become nonreentrant. This is due to the mechanism that Fortran uses to produce reentrant code.

For more information about creating reentrant Fortran programs, see VS FORTRAN Version 2 Programming Guide for CMS and MVS.