I have a flatfile which has record of fixed length and variable length with mulitple records in new line. For this i have created a single dictionary with 3 records with fixed positon fields.
1) Rec1 - for fixed length record fields 2) Rec2 - for variable length record fields 3) Rec3 - for the string which is coming from the flatfile I have created three schemas. For each Rec1 and Rec2 one fixed length shema and for Rec3 created a delimited schema(new line) . Now i have three documents doc 1,doc2 and doc3 from three schemas.
Then i am converting the input string to the doc3 and then spliting each string from doc3 to fixed string and variable string. Tehn converting fixed string to doc1 and varible string to doc2. Now i for a final document by taking the refernce of doc1 and doc2.
This logic is working for the flatfile which i said above. Is there any other efficient way for the above flatfile?