on 2015 May 25 2:43 PM
Hi,
Background - We are receiving a Flat File from an external system which contains Header, Detail and Trailer records. Detail Records are fixed length comma separated. See Sample data below -
HDRXXXYYY12345
MM8100422373,M631530008 ,1530008,031615,17
MN8100424411,M631530008 ,1530008,031615,22
XY8100422373,M631530008 ,1530008,031615,17
TRLXXZZZ4321
First line is the header (HDR - identifier) and the last line is trailer (TRL - identifier). As you can see there is no identifier for Detail records.
And so, it is throwing an error in the File Content Conversion of this file. Is there any way to implement the logic that if identifier is not equal to 'HDR' or 'TRL', it should be detail record?
Does anyone have idea on how to segregate the data into Header, Details and Trailer records? Is there any way to achieve this using java coding before message processing?
Thanks.
Request clarification before answering.
Hi Vijay,
IF you have read and write access to NFS folders of your PI system(NFS is simple, FTP is a bit slow and complex), you can have a two round processing.
round 1: process flat file with java map to add a key to Details and output to specific NFS folder.
round 2: process files with keys added from NFS folder with FCC.
Java map is very simple, you can use BufferedReader to read each line from flat file, then add key, say DET if the line isn't started with HDR or TRL. then concat each line and output to the NFS folder.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.