Making your application reentrant

This topic shows you how to make your application reentrant. Reentrancy allows more than one user to share a single copy of a load module. If your application is not reentrant, each application that calls your application must load a separate copy of your application.

The following routines must be reentrant:
  • Routines to be loaded into the LPA or ELPA
  • Routines to be used with CICS®
  • Routines to be preloaded with IMS™

Your routine should be reentrant if it is a large routine that is likely to have multiple concurrent users. Less storage is used if multiple users share the routine concurrently. Reentrancy also offers some performance enhancement because there is less paging to auxiliary storage.

If you want your routine to be reentrant, ensure that it does not alter any static storage that is part of the executable program; if the static storage is altered, the routine is not reentrant and its results are unpredictable.