When I start my requirement, I was not knowing the input file size and thats the reason I was unable to inform you upfront.
Yes, My JCL has worked fine which I tested for 10 records, I might have missed some code in pasting here..
I was under totally pressure, requirement was not clear at the starting, still my Unit testing deadlines are very tight....several other issues...
But I would like to thank everyone who helped me.
Also, I will try BillyBoy's suggestion to use sort exit (only for my learning when I find time later this week).