Sorry for answering so fast (and so far from a PC) without testing it before.
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Mail priva di virus. www.avast.com <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> Il giorno mer 7 ott 2020 alle ore 17:16 Sri h Kolusu <[email protected]> ha scritto: > > Here , i want to add the header in the OUT01-05 files . is there a > > way we can do in the same step. > > Ron, > > You used KEYBEGIN on 40,5 , the header record will have a Group number 1 > and the detail records will have group number starting at 2. So if your > input file always has a header then you need to use the group number 1 to > include the header. You also need to remove the temporary group id number > that you created. You need to use BUILD for that. > > //SYSIN DD * > OPTION COPY > OUTREC IFTHEN=(WHEN=GROUP,KEYBEGIN=(40,5),PUSH=(651:ID=2)) > OUTFIL FNAMES=OUT01,BUILD=(01,650),INCLUDE=(651,2,SS,EQ,C'01,02') > OUTFIL FNAMES=OUT02,BUILD=(01,650),INCLUDE=(651,2,SS,EQ,C'01,03') > OUTFIL FNAMES=OUT03,BUILD=(01,650),INCLUDE=(651,2,SS,EQ,C'01,04') > OUTFIL FNAMES=OUT04,BUILD=(01,650),INCLUDE=(651,2,SS,EQ,C'01,05') > OUTFIL FNAMES=OUT05,BUILD=(01,650),INCLUDE=(651,2,SS,EQ,C'01,06') > /* > > >> for instance if the header record is the only with double-blank at 651: > > > Massimo, > > That will NOT work. Keybegin will look wherever there is a change in the > key at position 40 for 5 bytes. So the first key change is on the Header > record itself. > > > Thanks, > Kolusu > DFSORT Development > IBM Corporation > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
