Changing multiple modules per step (MVS)

Figure 1 shows an example for MVS™. Conflicting names in USER.INPUT.LOAD(MEM1, MEM2, and MEM3) are replaced; USER.RESULT.LOAD(MEM1CHG) is the resulting executable program. You must explicitly include AFHWNCH before each individual program.

Figure 1. Changing conflicting names in multiple executable programs under MVS
//CHGNAM     EXEC PROC=AFHWN,PGMLIB=USER.RESULT.LOAD,GOPGM=MEM1CHG
//USERINP    DD   DSNAME=USER.INPUT.LOAD,DISP=SHR
//LKED.SYSIN DD   *
 INCLUDE SCEESAMP(AFHWNCH)
 INCLUDE USERINP(MEM1)
 INCLUDE SCEESAMP(AFHWNCH)
 INCLUDE USERINP(MEM2)
 INCLUDE SCEESAMP(AFHWNCH)
 INCLUDE USERINP(MEM3)
/*