I have a requirement like ,
To split a flat file and store data in different dataset.
Sample Input file format(Length 200)
===================
_w2345asf8790001:170:
A0010067 raj akshay 98648
B0006758 jay rakhinc 67589
_w2345asf8790001:168:
B9874646 ysgd yhnty 78659
u6788689 yiru ruiuu 987777
Out put file 1:should be like this,
_w2345asf8790001:170:
A0010067 raj akshay 98648
B0006758 jay rakhinc 67589
Output file2:shold be
_w2345asf8790001:168:
B9874646 ysgd yhnty 78659
u6788689 yiru ruiuu 987777
Maximum occurance of this header will be 4. like 168, 170, 176, 180
Please let me know How can I achieve this using SORT...
The search criteria can be string '_W' in the begining of each line.
I can confirm that '_W' wont come in file other than headers.
Jo