I should blame myself for the bad results..My apologies..
I edited input dataset for some reasons and forgot to revert it back.That is the reason for not getting desired output.
Due to my limited programming skills my thinking didn't go beyond adding seq numbers.
I was not aware of something called restart parameter in seq numbers.
But I learned a thing today which helped me a lot.Thanks a lot.