I have one file that has one record in it and I want to take data from a certain position and add it to every record in a second file that has multiple records but I only want some data from the second file.
Basically I'm building output records from the two files.
This is what I have from my last try at it, I'm getting all the data I want from the multi record second file but I'm loosing the one piece of data from the first file.
Iâ€™ve tried several different combinations and have searched a lot through your site and looked through many manuals.
Please advise me of my mistake(s). Thanks very much.
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//** FIXED LENGTH RECORD OF 80 (1 RECORD)
//INDT DD DSN=DAS.TEST.FILE1,DISP=SHR
//** FIXED LENGTH RECORDS OF 165 (SEVERAL RECORDS)
//INFL DD DSN=DAS.TEST.FILE2,DISP=SHR
//TEMP1 DD DSN=&&TEMP1,DISP=(MOD,PASS),SPACE=(TRK,(5,5)),UNIT=WORK
//OUT1 DD DSN=DAS.TEST.OUTPUT,
//TOOLIN DD *
COPY FROM(INDT) TO(TEMP1) USING(CTL1)
COPY FROM(INFL) TO(TEMP1) USING(CTL2)
//CTL1CNTL DD *
//CTL2CNTL DD *
OUTFIL FNAMES=OUT1,OVERLAY=(1:1,90,91:+0,TO=PD,LENGTH=6, << This was my last desperate attempt
97:91,6,103:103,4,107:+1,TO=ZD,LENGTH=3, going field by field & skipping over
110:107,6,116:113,3,119:116,3, the position from the first file.