Leo,
There may be a really clever way to accomplish this task, however if I
were to tackle it I would:
1. Ask the generator of the message to formalise to one single
structure (but this may not be possible);
2. Build three schemas (each containing the various subtleties of the
possible messages) and use three Flat-File Disassemblers (each with
one of the schemas) on your receive pipeline to generate a common
output message - because the disassemble-stage is a "first-match"
stage, when the flat-file disassembler that matches the incoming
message succeeds, no other components in that stage are called.
Hope this helps, Nick.
On Feb 1, 9:33 pm, Leo <L...@[EMAIL PROTECTED]
> wrote:
> Hi,
>
> I have flat files that are delimited. They can consist of different
number
> of CRLF between the records and attributes or no CRLF at all. Is there
any
> way to process all these files with one schema?
>
> Below are examples of flat files:
>
> 1st example:
>
> HEADER3435;3;76?
> rec1;f1;1000?
> rec2;f2;6565?
> rec3;f3;77;
>
> 2nd example:
>
> HEADER3435;3;76?
>
> rec1;f1;1000?
>
> rec2;f2;6565?
>
> rec3;f3;77;
>
> 3rd example:
>
> HEADER3435;3;76?rec1;f1;1000?rec2;
> f2;6565?rec3;f3;77;
>
> The result of all examples should be the same:
>
> <HEADER attr1="3435" attr2="3" attr3="76"/>
> <RECORD attr1="rec1" attr2="f1" attr3="1000"/>
> <RECORD attr1="rec2" attr2="f2" attr3="6565"/>
> <RECORD attr1="rec3" attr2="f3" attr3="77"/>


|