cancel
Showing results for 
Search instead for 
Did you mean: 

Sender File Adapter - File Content Conversion

Former Member
0 Kudos

Hello,

i do have a problem with the file content conversion at the sender file adapter.

I have configured the file content conversion with key field defined

keyfield: key

recordsetstructure is set as head,1,item,*

head.fieldSeparator |

head.beginSeparator |

head.endSeparator |

head.keyFieldValue H

head.fieldNames key,....

item.fieldSeparator |

item.beginSeparator |

item.endSeparator |

item.keyFieldValue I

item.fieldNames key,....

When i run it like this it will not read since it has a problem to identify the key fields.

When ever i change the whole logic to be not based on fieldseparator but on fixed length, everything is working perfectly fine.

but this unfortuantly doesn't help as i have no fixed structure for the rest of the fields.

also when i change the recordsetstructure to head,1,item,1 my file is also processed correctly, of corse only for the first line, it at least tells me that the file structure is correctly defined.

Can anyone help why the identification for the keyfields doesn't work with field names and separator but in the same set up with fixed lengths ?

thanks a lot

Accepted Solutions (1)

Accepted Solutions (1)

naveen_chichili
Active Contributor
0 Kudos

HI,

As per my understanding you are not configuring the Key field parameter correctly.Please cross check and specify the parameter KEY FIELD to identift the Header and Item correctly...it works....

Cheers!!!!!!!!!!!!

Naveen.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

try to remove beginSeparator and test agian.

Regards,

Jayan

Former Member
0 Kudos

Hello All,

thanks for the helpful answers.

So i tried Jayan tip and removed the begin Separter.

Unfortuantly my file is really looking like this |H|...|...| for the header record

and for the item record |I|...|...| ( this was an" I" like in Item ...

In my opinion this means i really do have a begin seperator which is the same like the field separator.

When i removed it from both the file and the config it started to work.

So i wrote an java function which will trow away the first digit in this case and integrated it in my szenario.

So that when this file is read there is no | as a begin flag anymore.

And the whole thing starts to work, this sounds more like a bug then a feature but anyway i am happy.

so thanks a lot

Tina

Former Member
0 Kudos

Hi Tina,

The issue is because for the Items, you have defined parameters begin Seperator and the keyFieldvalue are same. They should be different. Sometimes, it would be difficult to identify. So try to change the keyFieldValue for Itms then it should work.

Thanks,