on 10-17-2016 5:24 AM
Hi All,
We have a requirement to convert a flat file with Header, Detail and trailer record into XML. I got the record type identifier (Key field value) for only Header and trailer record but not for Detail record.
Is there any way to handle detail records without key field value in content conversion?
Thanks&Regards,
Akhila.A
Hi Akhila,
Read the file as simple structure and split header and footer in the message mapping, i have mentioned all the steps in below blog.
Read File Using FCC Some with Key and Some without Key
Regards,
Praveen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Evgeniy will come back
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Akhila!
The easiest way to split the string in java is to use String.split() method:
String srcStr = "aaa,bbb";
String[] tokens = srcStr.split(",");
String part1 = tokens[0]; //aaa
String part2 = tokens[1]; //bbb
You should consider not using commas inside your field values or provide the special logic for such cases.
To give points to Raghu just click up arrow below his avatar.
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ragha,
Thanks for the thread . The conclusion form the thread are:
1.To use Eng'sAdapter module
2.To take the entire file in one line and split it in mapping
I would like to go with oprion 2 : But fields are not fixed length in my case .Fields are seperated by comma. Is there any way to split the fields based on comma and map it to the target structure.
By the way how should I give points to your answer ?
Thanks&Regards,
Akhila.A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.