Author: Arun Raj
Posted: Sun Mar 05, 2017 10:11 am (GMT 5.5)
Here is one way of achieving it. You can add your INCLUDE in the CTL1 card to extract only R1 and R2 records.
OUT1
OUT2
_________________
Arun
----------------------------------------------------------------------------------------------------
Love is like an hourglass, with the heart filling up as the brain empties. -Jules Renard
Posted: Sun Mar 05, 2017 10:11 am (GMT 5.5)
Here is one way of achieving it. You can add your INCLUDE in the CTL1 card to extract only R1 and R2 records.
Code: |
//STEP01 EXEC PGM=ICETOOL //TOOLMSG DD SYSOUT=* //DFSMSG DD SYSOUT=* //IN DD DISP=SHR,DSN => Input data set (FB/80) //OUT1 DD SYSOUT=* //OUT2 DD SYSOUT=* //TOOLIN DD * SELECT FROM(IN) TO(OUT1) ON(81,8,CH) ALLDUPS DISCARD(OUT2) USING(CTL1) //CTL1CNTL DD * INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,2,CH,EQ,C'R1'), PUSH=(81:ID=8)) SORT FIELDS=COPY OUTFIL FNAMES=OUT1,BUILD=(1,80) OUTFIL FNAMES=OUT2,BUILD=(1,80) /* |
Code: |
R1 111111 R2 TERMS R1 111112 R2 TERMS R1 111114 R2 TERMS R1 111116 R2 TERMS |
Code: |
R1 111113 R1 111115 |
_________________
Arun
----------------------------------------------------------------------------------------------------
Love is like an hourglass, with the heart filling up as the brain empties. -Jules Renard