The action to take to relink-edit a pre-Language Environment executable program depends on whether it contains a reference to one or more of the conflicting names shown in Table 1:
//REPFORT EXEC PROC=AFHWL,PGMLIB=USER.FORT.LOAD
//USERINP DD DSN=USER.FORT.LOAD,DISP=SHR
//LKED.SYSIN DD *
INCLUDE SCEESAMP(AFHWRLK)
INCLUDE USERINP(MEM1)
NAME MEM1(R)
/*
Fortran routines are replaced with the equivalent Language Environment routines using the Fortran library module replacement tool, AFHWRLK. The existing and resulting executable program is USER.FORT.LOAD(MEM1). No DD statement is needed for the SCEESAMP library because it is already included in the AFHWL cataloged procedure.
PROC 0
CONTROL MSG NOFLUSH NOPROMPT SYMLIST CONLIST
LINK ('CEE.SCEESAMP(AFHWRLK)', +
'USER.FORT.LOAD(MEM1)') +
LOAD ('USER.FORT.LOAD(MEM1)') +
LIB ('CEE.SAFHFORT', +
'CEE.SCEELKED') NOTERM
The following example relink-edits an executable program containing both C and Fortran (or assembler) routines, where C references SQRT, and Fortran references SIN, LOG, and CLOCK. (The language of the main program here is C. If it were Fortran, the ENTRY CEESTART statement would be rewritten to instead name the Fortran main program.) The existing and resulting executable program is USER.FORTC.LOAD(MEM1).
//FORTC EXEC PROC=CEEWL,PGMLIB=USER.FORTC.LOAD
//USERINP DD DSNAME=USER.FORTC.LOAD,DISP=OLD
//SAFHFORT DD DSNAME=CEE.SAFHFORT,DISP=SHR
//SCEESAMP DD DSNAME=CEE.SCEESAMP,DISP=SHR
//LKED.SYSIN DD *
INCLUDE SAFHFORT(SIN)
INCLUDE SAFHFORT(LOG)
INCLUDE SAFHFORT(CLOCK)
INCLUDE SCEESAMP(AFHWRLK)
INCLUDE USERINP(MEM1)
NAME MEM1(R)
INCLUDE SYSLIB(EDCSTART)
INCLUDE SYSLIB(CEEROOTB)
INCLUDE SYSLIB(@@FTOC)
INCLUDE SYSLIB(@@CTOF)
INCLUDE USERINP(MEM1)
ENTRY CEESTART
NAME MEM1(R)
/*
The following example relink-edits an executable program containing both C and Fortran (or assembler) routines, where C references SQRT, and Fortran references SIN, LOG, and CLOCK. The existing and resulting executable program is USER.FORTC.LOAD(MEM1).
PROC 0
CONTROL MSG NOFLUSH NOPROMPT SYMLIST CONLIST
LINK ('CEE.SAFHFORT(SIN)', +
'CEE.SAFHFORT(LOG)', +
'CEE.SAFHFORT(CLOCK)', +
'CEE.SCEESAMP(AFHWRLK)', +
'USER.FORTC.LOAD(MEM1)') +
LOAD ('USER.FORTC.LOAD(MEM1)') +
LIB ('CEE.SCEELKED') NOTERM
LINK ('CEE.SCEELKED(EDCSTART)', +
'CEE.SCEELKED(CEEROOTB)', +
'CEE.SCEELKED(@@FTOC)', +
'CEE.SCEELKED(@@CTOF)', +
'USER.FORTC.LOAD(MEM1)') +
LOAD ('USER.FORTC.LOAD(MEM1)') +
LIB ('CEE.SCEELKED') NOTERM