-
Sep 6th, 2011, 03:43 PM
#1
Multi-Line File
I've looked over the manual and examples, but I can't seem to find a way to solve this riddle. I need to be able to process a file like this:
PR|123|NNN|312121|YFSES||
PR|123|NNN|312121|YFSES||
TX|3|FAEFAFEFSS|77.75||
PR|123|NNN|312121|YFSES||
PR|123|NNN|312121|YFSES||
PR|123|NNN|312121|YFSES||
PR|123|NNN|312121|YFSES||
TX|3|FAEFAFEFSS|77.75||
PR|123|NNN|312121|YFSES||
TX|3|FAEFAFEFSS|77.75||
TX|3|FAEFAFEFSS|77.75||
PR|123|NNN|312121|YFSES||
PR|123|NNN|312121|YFSES||
TX|3|FAEFAFEFSS|77.75||
TX|3|FAEFAFEFSS|77.75||
TX|3|FAEFAFEFSS|77.75||
PR|123|NNN|312121|YFSES||
PR|123|NNN|312121|YFSES||
In this example, each PR is to be processed by itself unless it has one or more TX records following it. In that case, the TX records need to be processed with the PR above them.
Is there any way to accomplish this?
Thanks for any help you might provide.
-
Sep 8th, 2011, 10:11 AM
#2
I think, you should look into RecordSeparatorPolicy: It decides weather the logical record is complete by looking into current line. If it is not complete, the current line will be appended to result, until the condition is satisfied.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules