Re: Matches keyword write the
Posted: Fri Oct 24, 2014 9:57 am
I have used the below code and got the expected output mentioned in the above post.. But only one clarification when i tried to generate sequence number in jcl control card the sequence number is generated like below: (Looks like the sequence number generated from bottom to top) Can any one tell me why it is generating from bottom to top) ?
AAAA001|0003
AAAA001|0002
AAAA001|0001
AAAA001|0003
AAAA001|0002
AAAA001|0001
SORT FIELDS=(1,7,CH,A,81,4,ZD,D)
INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,4,ZD,RESTART=(1,7))),
IFTHEN=(WHEN=GROUP,BEGIN=(81,4,ZD,EQ,1),PUSH=(85:40,5))
OUTREC OVERLAY=(81:SEQNUM,4,ZD,RESTART=(1,7),40:85,5)
OUTFIL INCLUDE=(81,4,ZD,EQ,1),BUILD=(1,80)
/*
INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,4,ZD,RESTART=(1,7))),
IFTHEN=(WHEN=GROUP,BEGIN=(81,4,ZD,EQ,1),PUSH=(85:40,5))
OUTREC OVERLAY=(81:SEQNUM,4,ZD,RESTART=(1,7),40:85,5)
OUTFIL INCLUDE=(81,4,ZD,EQ,1),BUILD=(1,80)
/*