on 03-14-2013 10:51 PM
I have a requirement wherein I need to split a file with the following structure -
MT_RECORD
- Header 1
- Details unbounded
I need to split this message into N messages using FCC & Recordsets per message. I tried desperately to work around it but was largely unsuccessful. If anyone can help me out that would be great.
I am able to parse the pipe-delimited file successfully with the following parameters:
Recordset Name: TEST
Record structure: Header,1, Details,*
Recordsets per message: 1
and ignoring the recordset name in my final structure. But I still am not sure how to split the message into
N messages with 1 Header & 1 Detail.
Any help would be greatly appreciated.
Thanks
Sri
Can you try one thing ..in your recordset name give TEST,100 or any other suitable number..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Finally, I decided to do it the hard way by reading the header in as a Detail structure and handling it in the mapping.
Thanks everyone for responding.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try using multi mapping and you need to write a logic in mapping to generate multiple records depends on detail record.Can be achieve easily.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the response. I cannot do it in the map as we need to split the file into multiple transactions in the message map and dont want the entire message to fail on a mapping error.
I cannot do it in using QoS:EOIO as the client doesn't want the processing to stop on failure. The only other option I have is to write a custom adapter module to split the 1-N Header-Detail into a N 1-1 Header-Detail structure. But I would like to avoid writing a custom module for something I can achieve using FCC.
Any other ideas ?
Hi Sridhar,
We have executed a similar kind of scenario with different file structure long time back and used shell script to split the source file into N no of files with desired no of records in the files and the sender FCC handle the processing from the defined folder.
Note: You need to ensure to have proper audit logs captured when you go with this kind of approach which helps during troubleshooting. In our case the source files were very huge and we had to opt this route.
Thanks,
Prasanthi
Hi Prasanthi - Thanks for the response. Even this is not an acceptable solution for us as the client is not for any solution that is not integrated. I know you might argue that the shell script will be added as a "pre-processing command" on the adapter but it is not acceptable.
At this point of time, if my understanding is correct, unless the file has N "Rows" there is no way to process it as multiple messages with the 1-N Header-Detail structure.
That leaves the adapter module as the only feasible solution.
Thanks
Sri
Hi Sri,
You are using "Record structure: Header,1, Details,*". So you need another message mapping to split this. After FCC, create a Message Mapping where Target Structure would be Header (1--1) and Details (1--1). You can use a custom Message Type. In Signature of Message Mapping keep occurrence of the Source Message Type as 1--1. You would easily achieve your requirement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.