Author: Rohit Umarjikar
Posted: Sat Oct 01, 2016 1:47 am (GMT 5.5)
Just a thought, between these big performance talks and may get avoided with simple approach.
1.Assuming the Header (D) is unique always.
Here is my approach.
a. I am not sure if sequence number is required but in case to sort back or its original order I have added, also '1' for reach record
b.Whenever we get a hit for Header , push the entire header for reach record (append).
c.group them (pushed headers) and count-This gives the details record count to overlay
d.Overlay the count in step c ,when its ONLY header(D) and include only records which has a space at 51:1
I stopped right here and got to go, may be someone can modify to finsh.
_________________
Regards,
Rohit Umarjikar
"Knowledge is knowing that a tomato is a fruit, but Wisdom is knowing not to put it in a fruit salad."![icon_razz.gif]()
Posted: Sat Oct 01, 2016 1:47 am (GMT 5.5)
Just a thought, between these big performance talks and may get avoided with simple approach.
1.Assuming the Header (D) is unique always.
Here is my approach.
a. I am not sure if sequence number is required but in case to sort back or its original order I have added, also '1' for reach record
b.Whenever we get a hit for Header , push the entire header for reach record (append).
c.group them (pushed headers) and count-This gives the details record count to overlay
d.Overlay the count in step c ,when its ONLY header(D) and include only records which has a space at 51:1
I stopped right here and got to go, may be someone can modify to finsh.
Code: |
//SORTIN DD * D123 R343 R343 D454 R343 //SYSIN DD * INREC IFOUTLEN=80, IFTHEN=(WHEN=INIT,OVERLAY=(30:C'1',40:SEQNUM,8,ZD)), IFTHEN=(WHEN=GROUP, BEGIN=(1,1,CH,EQ,C'D'),PUSH=(20:1,5)) OUTFIL REMOVECC,FNAMES=T1, SECTIONS=(20,5, TRAILER3=(50:COUNT-1=(M10,LENGTH=1))) |
_________________
Regards,
Rohit Umarjikar
"Knowledge is knowing that a tomato is a fruit, but Wisdom is knowing not to put it in a fruit salad."
