Flat File problems

Home Page Forums BizTalk 2004 – BizTalk 2010 Flat File problems

Viewing 0 reply threads
  • Author
    Posts
    • #19874

       Hi

      I Have a problem with a flat file i should parse to XML.  The file look like this (to see them proper, copy them out into notepad):

      PL00000358M16000001MTSACK    HEAD1000000  20081201000000002008-000076                     NOOSL                    NOMTS                                                              B99       S3        20000000042                                          |
      PL00000358M16000002MTSACK    HEAD2000000WARTSILA FINLAND OY, VAASA    WARTSILA FINLAND OY, VAASA    TARHAAJANTIE 2                P.O. BOX 252                  FIN-65101 VAASA                           FI                                                   |
      PL00000358M16000003MTSACK    HEAD30000002008050700001.00001BBK.BBK                                                                                                                                                                                            |
      PL00000358M16000004MTSACK    DSTAT200 cXMLOK                         The TX could be handled                                                                                                                                                                   |
      PL00000358M16000005MTSACK    TSTAT29  IMPAAccepted                   The TX is processed                                                                                                                                                                       |
      PL00000358M16000006MTSACK    HSTATm208mXMLGeneric Error              No email address provided – email acknowledgement can not be sent to the buyer                                                                                                            |
      PL00000358M16000007MTSACK    HSTATm203mXMLUnknown Vessel             Vessel IMO number is unknown                                                                                                                                                              |
      PL00000358M16000008MTSACK    HSTATm000mXMLJotun Header Default       Header Processed                                                                                                                                                                          |
      PL00000358M16000009MTSACK    LINE 0000000010BJREDWVA      ALKYDPRIMER RED 20L           00000040000           20000000093                                                                                                                                      |
      PL00000358M16000010MTSACK    LSTATm002mXMLJotun Detail Default       Line Processed                                                                                                                                                                            |
      PL00000358M16000010MTSACK    LSTATm003mXMLJotun Detail Default       Line Processed                                                                                                                                                                            |
      PL00000358M16000011MTSACK    LINE 000000002092210WVA      JOTUN THINNER NO. 10 20L      00000020000           20000000094                                                                                                                                      |
      PL00000358M16000012MTSACK    LSTATm000mXMLJotun Detail Default       Line Processed                                                                                                                                                                            |
      PL00000358M16000013MTSACK    LINE 0000000030JYCPBEVA      HARDTOP AS/HB. COMP B         00000005000           20000000095                                                                                                                                      |
      PL00000358M16000014MTSACK    LSTATm000mXMLJotun Detail Default       Line Processed                                                                                                                                                                            |
      PL00000358M16000015MTSACK    LINE 000000004092202WVA      JOTUN THINNER NO. 2           00000010000           20000000096                                                                                                                                      |
      PL00000358M16000016MTSACK    LSTATm002mXMLJotun Detail Default       Line Processed                                                                                                                                                                            |
      PL00000358M16000017MTSACK    LINE 0000000050DD038SVA      HARDTOP AS STD038 GREY A      00000035000           20000000097                                                                                                                                      |
      PL00000358M16000018MTSACK    LSTATm001mXMLJotun Detail Default       Line Processed                                                                                                                                                                            |
      PL00000358M16000018MTSACK    LSTATm002mXMLJotun Detail Default       Line Processed                                                                                                                                                                            |

      All lines is parsed OK from “MTSACK    HEAD1” and down to “MTSACK    HSTAT”. 
      The problem starts at “MTSACK    LINE “, becouse all of these lines has one or more status (“MTSACK    LSTAT”) lines joned to it.
      I have tried a lot of different ways and checked all examples I have found on the “net” with no succsess.
      What I have got most times is 1 line of 5, or all lines with the 1 status line on line 1, or all lines with all status lines on each line.

      Is there someone that can tell me how I should define the schema to get this to work ?

       

      This is the result I got for the moment (just copied the lines):
      </PurchaseOrderAckHeader>
      – <Item quantity=”40″ lineNumber=”001″ originatingSystemRef=”20000000093″>
        <Status code=”m002″ text=”Jotun Detail Default” information=”Line Processed” formatQualifier=”mXML” />
      – <ItemID>
        <SupplierPartID>0BJREDWVA</SupplierPartID>
        </ItemID>
      – <ItemDetail>
        <Description xml_lang=”en-US”>ALKYDPRIMER RED 20L</Description>
        </ItemDetail>
        </Item>
      – <Item quantity=”20″ lineNumber=”002″ originatingSystemRef=”20000000094″>
        <Status code=”m002″ text=”Jotun Detail Default” information=”Line Processed” formatQualifier=”mXML” />
      – <ItemID>
        <SupplierPartID>092210WVA</SupplierPartID>
        </ItemID>
      – <ItemDetail>
        <Description xml_lang=”en-US”>JOTUN THINNER NO. 10 20L</Description>
        </ItemDetail>
        </Item>
      – <Item quantity=”5″ lineNumber=”003″ originatingSystemRef=”20000000095″>
        <Status code=”m002″ text=”Jotun Detail Default” information=”Line Processed” formatQualifier=”mXML” />
      – <ItemID>
        <SupplierPartID>0JYCPBEVA</SupplierPartID>
        </ItemID>
      – <ItemDetail>
        <Description xml_lang=”en-US”>HARDTOP AS/HB. COMP B</Description>
        </ItemDetail>
        </Item>
      – <Item quantity=”10″ lineNumber=”004″ originatingSystemRef=”20000000096″>
        <Status code=”m002″ text=”Jotun Detail Default” information=”Line Processed” formatQualifier=”mXML” />
      – <ItemID>
        <SupplierPartID>092202WVA</SupplierPartID>
        </ItemID>
      – <ItemDetail>
        <Description xml_lang=”en-US”>JOTUN THINNER NO. 2</Description>
        </ItemDetail>
        </Item>
      – <Item quantity=”35″ lineNumber=”005″ originatingSystemRef=”20000000097″>
        <Status code=”m002″ text=”Jotun Detail Default” information=”Line Processed” formatQualifier=”mXML” />
      – <ItemID>
        <SupplierPartID>0DD038SVA</SupplierPartID>
        </ItemID>
      – <ItemDetail>
        <Description xml_lang=”en-US”>HARDTOP AS STD038 GREY A</Description>
        </ItemDetail>
        </Item>
        </PurchaseOrderAck>

Viewing 0 reply threads
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.