Running Easytrieve program EZTPA00 to compile and IEWL to link. If the output load from the link exists it is not replaced.
IEW2626S 4422 DUPLICATE MEMBER TESTPGM IN LIBRARY.
This is a sample of the JCL used:
//stepname EXEC PGM=EZTPA00,REGION=4M
//STEPLIB DD DISP=SHR,DSN=your.ezt.product.loadlib
//EZTVFM DD UNIT=SYSDA,SPACE=(4096,(100,100))
//SYSPRINT DD SYSOUT=A
//SYSLIN DD UNIT=SYSDA,SPACE=(400,(100,50)),DISP=(,PASS),
// DSN=&&SYSLIN
//SYSIN DD *
PARM LINK(TESTPGM)
...<easy> source statements...
//LKED EXEC PGM=IEWL
//SYSPRINT DD SYSOUT=A
//SYSLIN DD DSN=&&SYSLIN,DISP=(OLD,DELETE)
//SYSLIB DD DISP=SHR,DSN=your.ezt.product.loadlib
//SYSLMOD DD DISP=SHR,DSN=your.ezt.application.loadlib
//SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(1,5))
The Easytrieve program EZTPA00 will compile the Easytrieve source producing an object. The Easytrieve PARM LINK will add the link command NAME TESTPGM to the beginning of the OBJECT. This is used in the link step to indicate the linked program name. This is the member name that is used to store the linked program. To replace the linked program the LINK command NAME TESTPGM(R) is required. The (R) tells the link program to replace the load member.
The simplest way to resolve this is to change PARM LINK(TESTPGM) to PARM LINK(TESTPGM R). This tells Easytrieve to change the link command to NAME TESTPGM(R).
The other way to change this is to remove the PARM LINK(TESTPGM) from the Easytrieve compile step. Then change the link step as follows:
//LINK EXEC PGM=IEWL,PARM='LET,LIST,MAP'
...
//SYSLIN DD DISP=SHR,DSN=&&SYSLIN
// DD *
NAME TESTPGM(R)
/*
This change will add the link command to the bottom of the OBJECT.