I have very large txt file that I'm parsing with PatternMatchingCompositeLineMapper because each row have different number of columns.
In this file I have data from multiple periods, each period in this file is represented by header DATA with date of this period. After this header there are lines with data related to this period and they end with header STOP.
The problem is that I need to save data for all periods that start before and end after specific date, to another file.
Is there some way to do this in Spring Batch?
Sample file looks like this:
DATA|20121113-20121212
STRT|33|20121213|123425654|123
ASD|asd|asd|asd
QWE|qwe|qwe
ZXC|zxc|zxc|zxc|zxc
STOP
DATA|20121213-20130112
STRT|33|20130113|65465463546|123
ASD|asd|asd|asd
QWE|qwe|qwe
ZXC|zxc|zxc|zxc|zxc
STOP
DATA|20121113-20121212
STRT|33|20121213|34653465546|123.10
ASD|asd|asd|asd
QWE|qwe|qwe
ZXC|zxc|zxc|zxc|zxc
STOP
DATA|20120713-20120812
STRT|33|20121213|34654356546|123.10
STOP
DATA|20121213-20130112
STRT|33|20130113|345646345|123.10
ASD|asd|asd|asd
QWE|qwe|qwe
ZXC|zxc|zxc|zxc|zxc
STOP