cancel
Showing results for 
Search instead for 
Did you mean: 

Recordsset per message spliting failed

santosh_k3
Active Participant
0 Kudos

Hi All,

My scenario is File to File.

1) Sender file conists of 50 records

2) Receiver end it should contain 2 files with 25 records each.

My source and receiver structures are maintained as

Source Structure :

Record-------> 1...1

Data----


>1...1

receiver Structure:

Record----


>1..1

Header----->1..1

Data----


>1..unbounded

Trailer----


>1..1

Sender Comm Channel FCC parametes:

Qos : Exactly Once

Recordset Name : Record

Recordset structure : Data,*

Recordssets per Message : 25

Data.fieldNames : field names,......

Data.fielsSeparator : |

Data.endSeparator : 'nl'

Receiver Comm Channel FCC parametes:

Recordset Structure : Header,Data,Trailer

Header.fieldNames : field names,......

Header.fielsSeparator : |

Header.endSeparator : 'nl'

Data.fieldNames : field names,......

Data.fielsSeparator : |

Data.endSeparator : 'nl'

Trailer.fieldNames : field names,......

Trailer.fielsSeparator : |

Trailer.endSeparator : 'nl'

My requirement in receiver end 2 files should be of with 25 records only

Header

25 records

Trailer

But i am getting only one file with 50 records

Header

50 records

Trailer.

In MONI i am able to see only one successful message .

Can any body tell me were i did wrong.

Thanks

Sai

Accepted Solutions (1)

Accepted Solutions (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Target recordset structure is not right..

Give your recordset structure as : Header,1, Data,*,Trailer,1

santosh_k3
Active Participant
0 Kudos

Hi Baskar,

>>Give your recordset structure as : Header,1, Data,*,Trailer,1

If i give recordset structure as : Header,1, Data,*,Trailer,1

its giving an errror .

if i mention recordset structure as : Header, Data,Trailer

it is working fine, but the files are not getting splited acording to recordsset per messsage.

Thanks

Sai

Former Member
0 Kudos

Sai,

you cannot achive this for data. PI can split records based on Recordset and not for a particular structure of a recordset.

you have to define the strcuture "Data" as RecordSet and then only PI can split the records.

Since u have 3 structures ( Header, Data and Trailer) ... u cannot utilize this "Recordset Per Message" feature. You could have if you have only one structure.

For this u can use a simple multimapping. In message mapping just make the target message type unbounded

Write a small UDF and then count the records and then put a context change after 25 records.

U will get 2 files in the receiver.

Rgards

Biplab

Answers (3)

Answers (3)

Former Member
0 Kudos

Sai

Do the changes in sender channel as

Sender Comm Channel FCC parametes:

Qos : Exactly Once

Recordset Name : Record

Recordset structure : Data,1

Recordssets per Message : 25

Data.fieldNames : field names,......

Data.fielsSeparator : |

Data.endSeparator : 'nl'

Now you will be getting 25 Records in one message with one data in each. You can play in mapping to acheive you receiver structure.

So a file with 50 record wil geenrate 2 messages.

Regards

Raj

santosh_k3
Active Participant
0 Kudos

Hi All,

Thanks to every one.

Now its working.

i have changed the occurence of

Record from 1 to 1..unbounded

and The configuration parameters are like this

Recordset Name : Record

Recordset structure : Data,25

Recordssets per Message : 1

Thanks

Sai

Former Member
0 Kudos

Hi Sai,

Can you try this Once,

Receiver side :

Recordset structure : Record,1,Header,1,Data,*,Trailer,1

Former Member
0 Kudos

Hi Sai,

Can you try this Once,

Receiver side :

Recordset structure : Record,1,Header,1,Data,*,Trailer,1