The AFHWLG cataloged procedure shown in Figure 1 includes the LKED step, which invokes the binder (symbolic name HEWL) to link-edit an object module, and the GO step, which executes the executable program produced in the first step. The procedure can be used to link-edit and run applications containing Fortran or assembler routines having names that conflict with existing C library routines, as discussed in Resolving library module name conflicts between Fortran and C.
//LKED.SYSIN DD * (or appropriate parameters)
The data sets SAFHFORT and SCEELKED must both be included in your link-edit SYSLIB concatenation (in that order). SAFHFORT is the name of the Fortran-specific link-edit library and is used to resolve certain Fortran intrinsic function names. SCEELKED is the name of the Language Environment link-edit library. (The high-level qualifier of this link-edit library might have been changed at your installation.)
The data set SCEERUN must also be included in the STEPLIB DD statement for the GO step. (The name of the load library might have been changed at your installation.)
If the application refers to any data sets in the execution step (such as user-defined files or SYSIN), you must also provide DD statements that define these data sets.
//AFHWLG PROC LIBPRFX='CEE'
//LKED EXEC PGM=HEWL,REGION=1024K
//SYSLIB DD DSNAME=&LIBPRFX..SAFHFORT,DISP=SHR
// DD DSNAME=&LIBPRFX..SCEELKED,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSLIN DD DDNAME=SYSIN
//SYSLMOD DD DSNAME=&&GOSET(GO),
// SPACE=(TRK,(10,10,1)),
// UNIT=SYSDA,DISP=(MOD,PASS)
//SYSUT1 DD UNIT=SYSDA,SPACE=(TRK,(10,10))
//GO EXEC PGM=*.LKED.SYSLMOD,COND=(4,LT,LKED),REGION=2048K
//STEPLIB DD DSNAME=&LIBPRFX..SCEERUN,DISP=SHR
//SYSPRINT DD SYSOUT=*
//CEEDUMP DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*