How to temporarily replace a string in a ++include member to be used in a compile when the member is not stored in the source panlib

Document ID : KB000055327
Last Modified Date : 14/02/2018
Show Technical Document Details


For a member referenced as a ++INCLUDE member and does not reside in the source panvalet library, a mass-edit-replacement of a string needs to be preformed. This member resides in a copy library and only needs to be changed temporarily for use in a compile.


This is the JCL used to perform this function:

//STEP01      EXEC PGM=PAN#1                           
//PANDD1 DD DSN=your.copy.panlib,DISP=SHR     /* where the include resides */ //PANDD11  DD DSN=your.src,panlib,DISP=SHR  /* where the src mbr resides*/ 
//SYSPRINT DD SYSOUT=*                                 
//PANDD2  DD  DSN=your.output.file,DISP=(,CATLG),  /* file used for compile */              
//                      VOL=SER=xxxxxx,UNIT=SYSDA,SPACE=(CYL,(1,1))  
//SYSIN    DD *                                        
++UPDATE include mbr,1,TEMP    /* temporary update to the include member */                              
++R 1,5,/YYY/T61/                             /* replace string starting stmt. 1 end stmt. 5 */         
++WRITE WORK,source mbr        /* write src mbr with include expanded */