cancel
Showing results for 
Search instead for 
Did you mean: 

Issue regarding File Content Conversion

0 Kudos

Hi Team,

I have a requriement as described below:

My source structure is like below:

Header1

>Field1

>Field2

Header2

>Field1

>Field2

In the target side I need a text file where the file format would be like below:

Field1Field2

Field1 Field2

means value of Field1then value of Field2 from Header1 then new line

then value of Field1,a space then value of Field2 from Header2.

Is this possible through File Content Conversion and How?

Regards

Atanu Mazumdar

Accepted Solutions (0)

Answers (4)

Answers (4)

Ryan-Crosby
Active Contributor
0 Kudos

Hi Atanu,

The following FCC configuration would handle your scenario.  It looks like you are asking for no field separator which is what I have included here but if you need one that's easy enough to change:

Regards,

Ryan Crosby

Former Member
0 Kudos

Atanu,

Why don't you create target XML (after mapping) in below format:

Header1

>Field1

>Field2

i.e. Header1 will contain records values in following format:

<Field1><Field2>

<Field1 ><Field2>

<Field1><Field2>

<Field1 ><Field2>

Put a space after Field1 for every even line.

The apply content conversion on above structure:

Recordset Structure = Header1

Header1.fieldSeparator

Header1.endSeparator     'nl'

Header1.fieldName          Field1,Field2

Thanks

Rakesh

udo_martens
Active Contributor
0 Kudos

Hi Atanu,

have a look to Converting File Content in the Receiver Adapter:

Your structure is very similar to standard structure

<root>...

   <nameA>

         <value1>value</value1>

         <value2>value</value2>

         <value3>value</value3>

   </nameA>

   <nameB>

         <value4>value</value4>

   </nameB>

...

</root>

So you define substructure like "Header1", "Header2" and so on. Header1 has an empty field separator, Header2 a space.

Regards,

Udo

0 Kudos

Hi,

>>Is this possible through File Content Conversion and How?

I believe this is not possible with FCC only.

rgds

Mahesh.