Using the Language Environment library module replacement tool

The Fortran library module replacement tool provides a set of linkage editor REPLACE statements to help you replace all of the runtime library modules when your input to the linkage editor is an existing executable program containing the library modules. The tool supports executable programs created by VS FORTRAN Version 1, VS FORTRAN Version 2, and Language Environment. The source file containing the Fortran library module replacement tool is member AFHWRLK in the CEE.SCEESAMP library.

In Figure 1, the VS FORTRAN Version 2 runtime library modules in the executable program MYLMOD are replaced while retaining the compiled code, using the cataloged procedure CEEWL.

Figure 1. Replacing VS FORTRAN runtime library modules under batch, using CEEWL
//RELINK     EXEC PROC=CEEWL,PGMLIB=MYPDS.LOAD,GOPGM=MYLMOD
//SYSPRINT   DD   SYSOUT=A
//SAMPLIB    DD   DSN=CEE.SCEESAMP,DISP=SHR
//USERLMOD   DD   DSN=MYPDS.LOAD,DISP=OLD
//LKED.SYSIN DD    *
  INCLUDE SAMPLIB(AFHWRLK)
  INCLUDE USERLMOD(MYLMOD)
  NAME    MYLMOD(R)
/*

Figure 2 shows how you can perform the same replacement under TSO/E, using a CLIST.

Figure 2. Replacing VS FORTRAN runtime library modules under TSO/E, using a CLIST
PROC 0
CONTROL MSG NOFLUSH NOPROMPT SYMLIST CONLIST
LINK ('CEE.SCEESAMP(AFHWRLK)',        +
      'MYPDS.LOAD(MYLMOD)')           +
LOAD ('MYPDS.LOAD(MYLMOD)')           +
LIB  ('CEE.SCEELKED') NOTERM