Linking is the bridge between a successful compile and a repeatable production run. Compilation produces object code, but operations need an executable load module with a stable name in an application load library. The binder resolves external references to Easytrieve runtime routines and writes the module your execute JCL will call with PGM=. Beginners often stop troubleshooting at compile success and only discover link problems when the execute step cannot find or load the program.
Compiled object code is not the same thing as the finished executable used by batch operations. Object code contains the generated Easytrieve logic plus unresolved references to product services for file handling, report formatting, sorting, and environment support. The binder combines object input with runtime libraries and produces a load module that z/OS can load directly when the job starts.
12345678910//COMPILE EXEC PGM=EZTPA00 //STEPLIB DD DSN=DEV.EASYTRIEVE.CBAALOAD,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSIN DD DSN=DEV.EZT.SOURCE(INVRPT),DISP=SHR //SYSLIN DD DSN=&&OBJ,UNIT=SYSDA,SPACE=(TRK,(5,5)),DISP=(,PASS) //LINK EXEC PGM=IEWL,PARM='LIST,MAP,XREF' //SYSLIN DD DSN=&&OBJ,DISP=(OLD,DELETE) //SYSLMOD DD DSN=DEV.APP.LOADLIB,DISP=SHR //SYSPRINT DD SYSOUT=*
The compile step passes temporary object &&OBJ to the link step. IEWL reads SYSLIN and stores the executable member in DEV.APP.LOADLIB through SYSLMOD. The module name usually comes from the compile PARM LINK(name) request or binder control statements depending on shop standards.
| DD name | Role |
|---|---|
| SYSLIN | Input object dataset from compile |
| SYSLMOD | Output application load library receiving the module |
| SYSPRINT | Binder listing and diagnostic messages |
| STEPLIB or product libs | May be needed so binder resolves Easytrieve runtime references |
The linked module name must align with production execute JCL. If compile requests LINK(INVRPT), the execute step normally uses PGM=INVRPT and STEPLIB that includes the library where SYSLMOD stored the module. A mismatch between linked name, member alias, and execute PGM= is a frequent cause of module-not-found errors that look like runtime failures but are really promotion or naming problems.
| Approach | Advantage | Consideration |
|---|---|---|
| PARM LINK(name) in compile flow | Fewer JCL steps for simple development | Less visible split between compile and link artifacts |
| Separate IEWL step | Clear promotion point and binder listing review | Requires passing SYSLIN correctly between steps |
Binder listings on SYSPRINT show module name, included sections, unresolved references, and map information when requested. Review link listings for regulated changes the same way you review compile listings. A link success with unexpected module name or wrong library can still break production execution later.
Development linking into DEV.APP.LOADLIB does not automatically update production. Mature lifecycles copy or promote the approved module into PROD.APP.LOADLIB through controlled procedures. Promotion should record compile listing, link listing, test evidence, and the exact module name promoted. Never assume a test link updated production just because the bind step ended with RC=0.
Linking is putting the finished puzzle pieces into the box with the right picture on the front. Compile cuts the pieces. Linking makes the box and label so the shelf knows exactly which puzzle to grab later. If the label says INVRPT, the shelf must look for INVRPT, not some other name.
1. Linking converts:
2. Object code from compile usually comes from:
3. The binder step on z/OS commonly uses PGM=
4. The linked module name must match:
5. Linking is needed because object code: