Using library routine retention (LRR)

LRR is a function that provides a performance improvement for those applications or subsystems running on MVS with the following attributes:

  • The application or subsystem invokes programs that require LE
  • The application or subsystem is not LE-conforming (i.e., LE is not already initialized when the application or subsystem invokes programs that require LE)
  • The application or subsystem repeatedly invokes programs that require LE running under the same MVS task
  • The application or subsystem is not using LE preinitialization services

LRR is useful for non-LE-conforming assembler drivers that repeatedly call LE-conforming languages and for IMS/TM regions. LRR is not supported under CICS®. See IMS for information on using LRR under IMS.

When LRR has been initialized, LE keeps a subset of its resources in memory after the environment terminates. As a result, subsequent invocations of programs in the same MVS task that caused LE to be initialized are faster because the resources can be reused without having to be reacquired and reinitialized. The resources that LE keeps in memory upon LE termination are:
  • LE runtime load modules
  • Storage associated with these load modules
  • Storage for LE startup control blocks

When LRR is terminated, these resources are released from memory.

LE preinitialization services and LRR can be used simultaneously. However, there is no additional benefit by using LRR when LE preinitialization services are being used. Essentially, when LRR is active and a non-LE-conforming application uses preinitialization services, LE remains preinitialized between repeated invocations of LE-conforming programs and does not terminate. Upon return to the non-LE-conforming application, preinitialization services can be called to terminate the LE environment, in which case LRR will be back in effect. See Using library routine retention (LRR) for an example of using LRR.

Performance considerations using LRR:
  • One testcase (a non-LE-conforming Assembler calling COBOL) using LRR was 96% faster than not using LRR.
    Note: This test measured only the overhead of the CALL (i.e., the subprogram did only a GOBACK); thus, a full application that does more work in the subprograms may have different results.

See First program not LE-conforming for additional performance considerations comparing using LRR with other environment initialization techniques.

Related references
Language Environment® library routine retention (LRR) (z/OS® Language Environment Programming Guide)
Using Language Environment under IMS (z/OS Language Environment Customization)