My input file has multiple formats. My first line will be delimited and the remaining file will be fixed length.
How to write my mapping xml file and read it from java?
I tried writing multiple streams but that didn't work.
My mapping.xml is something like this,
<beanio xmlns="http://www.beanio.org/2012/03"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.beanio.org/2012/03 http://www.beanio.org/2012/03/mapping.xsd">
<stream name="ebcdicFile" format="delimited">
<parser>
<property name="delimiter" value="|" />
</parser>
<record name="header"
class="sft_action_cms_apt_394.sft_action_cms_apt_394.FileSegment">
<field name="fileName" />
<field name="batchCount" />
<field name="totalRecords" />
<field name="maxBatchSize" />
<field name="pickUpTime" />
<field name="errorFlag" />
</record>
</stream>
<stream name="file" format="fixedlength">
<record name="dec"
class="sft_action_cms_apt_394.sft_action_cms_apt_394.pojo">
<field name="tag" length="4" />
<field name="description" length="unbounded" />
</record>
</stream>
</beanio>