On Thu, 23 Oct 2014 15:43:44 +0200, Thomas Berg wrote: > >I want to copy position 31 to 40 of all records but from record 8 and 9 I > >want > to copy also (concatenate) position 71 to 80 and from record 6 to 8 I also > (concatenate in "front") want to copy position 1 to 3.
//* //STEP1 EXEC PGM=SORT //* //SYSOUT DD SYSOUT=* //SORTIN DD * 001aaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbb01ccccccccccccccccccccccccccccccdddddddd01 002aaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbb02ccccccccccccccccccccccccccccccdddddddd02 003aaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbb03ccccccccccccccccccccccccccccccdddddddd03 004aaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbb04ccccccccccccccccccccccccccccccdddddddd04 005aaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbb05ccccccccccccccccccccccccccccccdddddddd05 006aaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbb06ccccccccccccccccccccccccccccccdddddddd06 007aaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbb07ccccccccccccccccccccccccccccccdddddddd07 008aaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbb08ccccccccccccccccccccccccccccccdddddddd08 009aaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbb09ccccccccccccccccccccccccccccccdddddddd09 010aaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbb10ccccccccccccccccccccccccccccccdddddddd10 //SORTOUT DD SYSOUT=* //SYSIN DD * INREC FIELDS=(1,80,SEQNUM,4,BI) OUTREC IFTHEN=(WHEN=(81,4,BI,GE,6,&,81,4,BI,LE,7), BUILD=(1,3,31,10,80:X)), IFTHEN=(WHEN=(81,4,BI,EQ,8), BUILD=(1,3,31,10,71,10,80:X)), IFTHEN=(WHEN=(81,4,BI,EQ,9), BUILD=(31,10,71,10,80:X)), IFTHEN=(WHEN=NONE, BUILD=(31,10,80:X)) OPTION COPY /* Norbert Friemel ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN