Hi Team
I have a input file which is having many header which is common value as below ( Header - ONDEMAND INDEX ) , now i want this files to be divided in 2 or 3 files based on count of header in this case ( ONDEMAND INDEX ), please help me on this
Input File :
ONDEMAND INDEX
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
ONDEMAND INDEX
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
ONDEMAND INDEX
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
ONDEMAND INDEX
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
ONDEMAND INDEX
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
ONDEMAND INDEX
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
Suppose Result needs files to be divided in 3 files after 2 count of "ONDEMAND INDEX"
Out put file : 1
ONDEMAND INDEX
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
ONDEMAND INDEX
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
Out put file : 2
ONDEMAND INDEX
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
ONDEMAND INDEX
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
Out put file : 3
ONDEMAND INDEX
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------
ONDEMAND INDEX
-----Data Part----IT CAN BE ANY NUMBER OR CHARS------