cancel
Showing results for 
Search instead for 
Did you mean: 

Content conversion with file splitting

NishantChavan
Participant
0 Kudos

Hi Experts.

I have a scenario where I am getting fixed length file from system A and want to convert that to XML and break it into multiple files (individual records) and send to system B. System B cannot accept big files. It has to be split into individual records into individual file before sending it.

Input structure for example

UH, Number, FName, LName, Date, City, Zip -----Header Record

UD, Number, FName, Lname, zip                         ---Detail Record

UD, Number, FName, Lname, zip                         ---Detail Record

DH, Number, Fname                                     -----Header Record

DH, Number                                                          ---Detail Record

DH, Number                                                          ---Detail Record

output should be multiple files output, splitting at each header record.

<Recordset>

     <UH>

          <Number></Number>

          <Fname></Fname>

          <Lname></Lname>

          <Date></Date>

          <City></City>

          <Zip></zip>

     </UH>

     <UD>

          <Number></Number>

          <Fname></Fname>

          <Lname></Lname>

          <Zip></zip>

     </UD>

<Recordset>

File2

<Recordset>

     <DH>

          <Number></Number>

          <Fname></Fname>

     </DH>

     <DD>

          <Number></Number>

     </D>

<Recordset>

I am facing challenges for content conversion. If i can create the xml in about format then i can easily break in mapping but not able to generate the XML properly. You can provide the suggestion on content conversion or mapping (ed multi mapping etc)

Thanks,
NIshant

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member182412
Active Contributor
0 Kudos

Hi Nishant,

You can use below FCC.

Recordset Structure: UHeader,1,UDetail,*,DHeader,1,DDetail,*

DDetail.keyFieldValueDD
DDetail.keyFieldNamekey
DHeader.keyFieldValueDH
UDetail.keyFieldValueUD
UDetail.keyFieldNamekey
DHeader.keyFieldNamekey
UHeader.keyFieldValueUH
UHeader.keyFieldNamekey
DDetail.endSeparator'nl'
DDetail.fieldSeparator,
UHeader.fieldSeparator,
UHeader.endSeparator'nl'
UDetail.fieldSeparator,
UDetail.endSeparator'nl'
DHeader.fieldSeparator,
DHeader.endSeparator'nl'
DDetail.fieldNameskey,Field1,Field2
DHeader.fieldNameskey,Field1,Field2
UDetail.fieldNameskey,Field1,Field2
UHeader.fieldNameskey,Field1,Field2

Regards,

Praveen.

NishantChavan
Participant
0 Kudos

Hi Praveen,

This is the exact FCC i have currently, its putting UH, DH under the same recordset. I am trying to separate them using mapping but FCC/transform bean would be helpful.

Thanks,

Nishant

former_member182412
Active Contributor
0 Kudos

Hi Nishant,

You can simply separate them in the mapping because you cannot split them in FCC as they are different structures (They are part of one Recordset).

Regards,

Praveen.

former_member186851
Active Contributor
0 Kudos

Hello Nishant,

Define Recordset per message as 1 to spilt in to individual messages.

Refer the below link

File Content Conversion - Process Integration - SCN Wiki

NishantChavan
Participant
0 Kudos

Hi Raghu,

Thats little helpful but the problem is whenever there is DH its coming under UH so that recordset contains 2 records.

Thanks,

Nishant

former_member186851
Active Contributor
0 Kudos

Hello Nishanth,

That should be fine.You have any unique field?

And also post one sample data.

NishantChavan
Participant
0 Kudos

I have key field. the first field is key field.