|
Home > Archive > BizTalk Server > May 2004 > Hierarchical multirecord flat file parsing (BizTalk 2002)
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Hierarchical multirecord flat file parsing (BizTalk 2002)
|
|
|
| I'm having trouble trying to create document definition for the following
flat file:
Account Number: 12345;
Account Name: AU89
XYZ Corp; 123.76; 01/01/2004; 456.87
ABC Corp; 523.55; 01/01/2004; 3635.89
DEF Corp; 644.34; 01/01/2004; 7736.34
Account Number: 8745;
Account Name: ABC098
EDF Corp; 123.76; 01/01/2004; 456.87
GFD Corp; 523.55; 01/01/2004; 3635.89
Account Number: 560345;
Account Name: CD986
YUT Corp; 123.76; 01/01/2004; 456.87
ZDR Corp; 523.55; 01/01/2004; 3635.89
YUI Corp; 644.34; 01/01/2004; 7736.34
TDK Corp; 644.34; 01/01/2004; 7736.34
As you can see we have a header records for each account (Account Number &
Account Name) and multiple detail records for each account. One file
contains multiple accounts.
I was able to create Doc. that generates appropriate file format. However,
when I'm trying to read the files that came from the bank the parser
recognizes 1st header (I have 0 to 1 occurences for Acc Name and for Acc
Number) then it starts reading detail records (0 To * occurances) and from
this point treats all the remaining lines in the document as detailed
records. I specified "Element Tag string" (don't remember exact property
name, but it's located under Parse tab for the record) for 2 header records
as "Account Number" and "Account Name", so theoretically speaking parser
should know when it has header records and when it has detailed records.
However, looks like this is not the case. As you can see, detailed record
contains more fields. If I'm specifying the last field in detail record as
Required then the parser just fails when it's parsing the next header (Acc
Number) record.
Please help me to resolve this problem since I need it asap.
Thanks!
| |
|
| Thanks David!
I opened support call with MSFT and they actually confirmed that BT2002
parser cannot parse this kind of file unless there is source tag qualifier
for detailed record.
BT2004 parser will handle this file without that tag.
"David Downing [MSFT]" <ddowning@online.microsoft.com> wrote in message
news:OnGcOEtLEHA.2612@TK2MSFTNGP10.phx.gbl...
> You'll probably need to provide some kind of a tag for the corporate
> information that can be used to recognize the corporation record. I've
> attached a sample that accomplishes this by adding "Corportation Name: "
as
> a tag for the corporate record. The generated XML looks like:
>
> <MySchema>
> <AccountRecord>
> <AccountNumber AcctNumber="12345" />
> <AccountName AcctName="AU89" />
> <CorporateInfo Name="XYZ Corp" Amount1="123.76" Date="01/01/2004"
> Amount2="456.87" />
> <CorporateInfo Name="ABC Corp" Amount1="523.55" Date="01/01/2004"
> Amount2="3635.89" />
> <CorporateInfo Name="DEF Corp" Amount1="644.34" Date="01/01/2004"
> Amount2="7736.34" />
> </AccountRecord>
> <AccountRecord>
> <AccountNumber AcctNumber="8745" />
> <AccountName AcctName="ABC098" />
> <CorporateInfo Name="EDF Corp" Amount1="123.76" Date="01/01/2004"
> Amount2="456.87" />
> <CorporateInfo Name="GFD Corp" Amount1="523.55" Date="01/01/2004"
> Amount2="3635.89" />
> </AccountRecord>
> <AccountRecord>
> <AccountNumber AcctNumber="560345" />
> <AccountName AcctName="CD986" />
> <CorporateInfo Name="YUT Corp" Amount1="123.76" Date="01/01/2004"
> Amount2="456.87" />
> <CorporateInfo Name="ZDR Corp" Amount1="523.55" Date="01/01/2004"
> Amount2="3635.89" />
> <CorporateInfo Name="YUI Corp" Amount1="644.34" Date="01/01/2004"
> Amount2="7736.34" />
> <CorporateInfo Name="TDK Corp" Amount1="644.34" Date="01/01/2004"
> Amount2="7736.34" />
> </AccountRecord>
> </MySchema>
>
>
> --
> Dave
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "io" <r@s.com> wrote in message
> news:jxlkc.1696$ph2.677@fe39.usenetserver.com...
following[vbcol=seagreen]
&[vbcol=seagreen]
However,[vbcol=seagreen]
from[vbcol=seagreen]
> records
record[vbcol=seagreen]
as[vbcol=seagreen]
(Acc[vbcol=seagreen]
>
>
>
|
|
|
|
|