cancel
Showing results for 
Search instead for 
Did you mean: 

generating multiple files based on recordsets

former_member191435
Contributor
0 Kudos

Hi everyone,

I have a requirement in PI where i need to collect few records in one file and remaining in one more file.How can i do that?

For eg. if the source generates 10 records , at the target i need to have 2 files each having 5 records.

At the target side, if am getting 10 recordsets, 5 must generate 0ne file, and other 5 as a new file.

Thanks in advance

Accepted Solutions (0)

Answers (3)

Answers (3)

PriyankaAnagani
Active Contributor
0 Kudos

Hi,

Change the occurrence of target message to 0..unbounded in your message mapping, and follow the below logic to map the target message you'll get 5 records in each file.

divide>ceil>SplitByValueChange>collapseContext>TargetMessageType

Divide:

input1:sourceRecordset>removeContext>index(1,1)

input2:constant5

Regards,

Priyanka.

Former Member
0 Kudos

Enivas

Do the multimapping to generate parent node after every 5 recordsets.

Regards

Raj

Former Member
0 Kudos

Hi ,

For this requirement you can proceed with either of one approch

1.Create two different target structures (add in the Signature tab in message mapping ) and map with the corresonding elements.

2.You can make use of Multimapping Concept for Splitting Single file into two or more based on condition without using BPM

Check the below link :

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