cancel
Showing results for 
Search instead for 
Did you mean: 

Splitting file - receiver file adapter

Former Member
0 Kudos

Hi Gurus,

How to split the file at receiver FA. Condition is, if the number of records is more than 1000, I require creating a new file.

regards

Unni

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hey

This can be easily done in Message mapping,set the occurence of receiver structure to 1-unbounded ,then write a UDF to count number of context change and for every 1000 context change,create a new receiver structure.

Thanks

Aamir

Edited by: Aamir Suhail on Jun 9, 2009 3:42 PM

Former Member
0 Kudos

Hi Amir,

My ED structure is as below

Listing 1..1

Header 1...1

some add fields

Exception 1..1

Exceptions 0..unbounded

Do I change the Listing to unbounded?

More over how to create the new record structure after counter hits 1000?

Regards

Unni

Former Member
0 Kudos

Go to Messages tab in graphical mapping and change the occurrence of target structure to 0..unbounded

Refer

/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible

Mapping logic for target root node ...MT_target -


>

You can write UDF to count 1000 source records and after every 1000 records use result.addContextChange(); method

This will produce multiple target nodes

UDF should be of type Queue

Configuration scenario would be as usual except Enhanced Interface Determination. Above blog talks about this also

Former Member
0 Kudos

Why don't you send multiple messages (with the splitting done from the mapping) to the adapter..

Make the Target msg as 1:n. After 1000 receords, create a new Message... Then you don't need to do anything at the receiver FA.

I am not aware of any params in receier FA to do the file split.

-SM