The structure of flat file is like this:
File hedaer 00(record ID)
Batch header 01( record Id)
Batch records 03(record ID).
There are several batch records but the fields in all the batch records are different but have the same record ID which is 03)
Here, as you can see the structure of my fourth and fifth 03 records (in red are different), although their length are same.In the solution provided by you , you have asked to create field definitions 031,032 which is incorrect as the requirement is “different 03 record definitions”.Please suggest a way out
The flatfile data you have posted is with Record Identifier… In the above example, you have 3 record identifiers
File Header 00 or 0056
Batch Header 01 or 0156
Batch Record 03 or 0356
You can create a flatfile schema with record identifier, if all the Batch Record holds the same value as record identifier, and same structure (field separators like ,|-; etc., should differentiate fields)… What is that 0656… Is that another record ?
For example, data should look like
0056 headerfield1 headerfield2 headerfield3 - field separator space ( )
0156 batchfield1 batchfield2 batchfield3 - field separator space ( )
0356 recordfield1,recordfield2,recordfield3 - field separator ,
0356 recordfield1,recordfield2,recordfield3
0356 recordfield1,recordfield2,recordfield3
0356 recordfield1,recordfield2,recordfield3
0356 recordfield1,recordfield2,recordfield3