cancel
Showing results for 
Search instead for 
Did you mean: 

Flat File Conversion

Former Member
0 Kudos

Hi All,

My source file structure :

<Record>....0 Unbounded

<Name>

<Phone>0 Unbounded

<Subjects>0 Unbounded

</Record>

Now if my source flat file is

A,111,222,333,444,MAths,Science,English,

B,555,666,777,English

and target file for above flat file should be as :

<Record>....0 Unbounded

<Name><Name>

<Phone>111</Phone>

<Phone>222</Phone>

<Phone>333</Phone>

<Phone>444</Phone>

<Subjects>Maths</Subjects>

<Subjects>Science</Subjects>

<Subjects>English</Subjects>

</Record>

<Record>....0 Unbounded

<Name>B<Name>

<Phone>555</Phone>

<Phone>666</Phone>

<Phone>777</Phone>

<Subjects>English</Subjects>

</Record>

How should I configure this in File Content Conversion?

I am not able to figure out how to configure multiple occurences of phone and Subjects field in content conversion as record is also having 0-Unbound.

Please help.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Kindly mention content conversion parameters like

Recordset Name : Details

Recordset structure : Record, , Name , 1, Phone,,Subjects, *

KeyfieldName : please mention key

Also add key field value parameters to identify the substructures in the recordset .

Regards,

Former Member
0 Kudos

Hi Aamir,

yes ..........it is wrapped in a root structure with 1:1....

In the example given by me I have not mentioned it ..sorry for that...

the structures are as below:<b>

source:</b>

Hi All,

<details>

<Record>....0 Unbounded

<Name>

<Phone>0 Unbounded

<Subjects>0 Unbounded

</Record>

</details>

<b> target</b>

<Students>

<Record>....0 Unbounded

<Name>A<Name>

<Phone>111</Phone>

<Phone>222</Phone>

<Phone>333</Phone>

<Phone>444</Phone>

<Subjects>Maths</Subjects>

<Subjects>Science</Subjects>

<Subjects>English</Subjects>

</Record>

<Record>....0 Unbounded

<Name>B<Name>

<Phone>555</Phone>

<Phone>666</Phone>

<Phone>777</Phone>

<Subjects>English</Subjects>

</Record>

</Students>

Former Member
0 Kudos

hey

both your source and target structures are not valid XML structures,you have multiple occurence for root node <Record> which is not allowed.

u need to wrap the structures under a single root node like <Recordset> 1-1

Thanx

Aamir