cancel
Showing results for 
Search instead for 
Did you mean: 

How to do a sender File Content Conversion with this structure ?

Former Member
0 Kudos

Hi SDN,

I have a flat file with this format :

header1

header2

...

headerN

///////

detail1

detail2

...

detailM

header and detail are strings with differents lengths.

There is no key field.

What are the method to do a FCC with this structure ?

thanks in advance

Greg

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

What is the structure of file it is CSV separator or fixed length.

Refer the below link:

/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30

chirag

Former Member
0 Kudos

Hi Chirag,

The structure of the file is fixed length.

In this blog, there are key fields but in my structure, there are no key fields.

Greg

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Can you post a sample file?

Sometimes the key fields can be declared by us.... as long as we know which data goes where...

the only thing would be u need to be a bit more careful while defining ur mapping.....

Cheers!!

Sidharth

Former Member
0 Kudos

Hi Sidharth,

How do you do that?

Greg

Former Member
0 Kudos

**

Edited by: Grégory FRANCOIS on Apr 9, 2008 6:40 PM

Former Member
0 Kudos

Hi,

Without key fields u can not differentiate Header n detail records.

it should be there otherwise u can not write FCC to convert it into exact XML structure.

chirag

Former Member
0 Kudos

Hi chirag,

Thank you for your prompt answer

There is really no solution to my problem?

Java mapping, XSLT, ... ?

The latter solution would be to modify the original file, but the bosses do not want to make specific development in the legacy application.

Greg

Former Member
0 Kudos

Hi,

Have a look at the below thread may this can help a bit:

Reading a file using java mapping.

/people/rahul.nawale2/blog/2006/07/18/java-mapping-an-alternate-way-of-reading-a-csv-file

chirag

Former Member
0 Kudos

Hi,

This blog helps me do any more but thank you anyway.

In fact, I repeat, I do not have a key fields and even fewer separator.

Greg

Former Member
0 Kudos

Hi,

Is the data coming in header and detail are different.

can u tell me ur test data which is coming in the file.

chirag

Former Member
0 Kudos

Hi,

Here is my test data :

3D10512224046N350 106500002000020083,450072413090545023500280242

3D10512224142N388 63400012000120138,050062213030641032902310041

3D10512224143N355 191600009000080333,850062914360806045901430124

//////////

3D105122230127/014046N 106501080015301051222084500170000,6894840047,4027610101

3D105122233970/014046N 106501090011001051222105800110000,6895330047,3884300102

3D105122228864/014142N 63402050008301051222065900080000,7999170047,3951100101

3D105122210381/014142N 63401073011001051222071500190000,7397000047,3853100102

3D105122210668/014142N 63403070011591051222081200100000,8302500047,3871200103

3D105122210342/014142N 63405073011591051222082700130000,8269000047,3866200104

3D105122223934/014142N 63404073011301051222085100120000,8365170047,3757800105

3D105122210380/014142N 63409063011591051222092900120000,9868670047,3974300106

3D105122201670/014142N 63406050011591051222100000110000,9861830047,5372000107

3D105122210514/014142N 63410073011001051222103300070000,9895830047,4272700108

3D105122201339/014142N 63407090014301051222105300190000,9831410047,4126660109

3D105122204940/014142N 63408073014301051222111700150001,0161500047,4243200110

3D105122225675/014142N 63411090012001051222121100191000,7733330047,3888700111

3D105122205447/014142N 63401080012001051222123800061000,7442170047,3867100112

3D105122216716/014143N 191601080011001051222074300091000,2266940047,8758400101

3D105122222952/014143N 191601073011301051222081800360000,3559120047,9371010102

3D105122225232/014143N 191601063014001051222090600130000,4123830047,8753300103

3D105122216516/014143N 191601083012001051222095700080000,4648000047,8643300104

3D105122230377/014143N 191601070012001051222100700040000,4714830047,8638500105

3D105122221885/014143N 191601073012001051222104500130000,5358330048,0378500106

3D105122208380/014143N 191601071517001051222122500110000,5779500047,7382700107

3D105122224171/014143N 191601070011001051222124300081000,6140330047,7543800108

There is no key code because the data are different depending on the companies in my group.

Greg

Former Member
0 Kudos

Hi,

How u r differentiating for header and detail records.

can u pls let me know from the test data.

chirag

Former Member
0 Kudos

Hi,

As I explained earlier in this discussion, the structure of the test file is as follows:

the header lines are located before '/////////' and lines details later.

Greg

Former Member
0 Kudos

Hi,

It will be difficult. if I use 3D as key field then also it will not help.

I wounder why u the file data is in format specified by u and why /////put inbetween.

chirag

Former Member
0 Kudos

Hi,

this is because the sender application can not do otherwise

I can not change the file structure.

Greg

Former Member
0 Kudos

Hi,

There are no other option in File adapter u need to go for java only.

chirag