Empty rows in flat file

Home Page Forums BizTalk 2004 – BizTalk 2010 Empty rows in flat file

Viewing 1 reply thread
  • Author
    Posts
    • #23970

      Hello,

      I’m trying to create a flat file schema that can validate a flat file that looks like this:
      _______________________________________
      #Head1 headValue1
      #Head2 headValue1
      #Head3 headValue1
      #Head4 headValue1
      #Head5 headValue1 headValue2
      #Body1_1 bodyValue1 “bodyValue2”
      #Body1_2 bodyValue1 bodyValue2
      #Body2 bodyValue1 bodyValue2
      #Body3 bodyValue1
      _______________________________________

      My problem is that there can occur empty rows any where in the file after the header posts and I need to take care of this. I’ve tried to add an empty row element that can take care of this and it works fine if there are at least one empty row for each element. If an empty row doesn’t exist the empty row element “steals” the rest of the file and adds as many empty row elements as there are rows in the file.

      My “EmptyRow” element looks like this:

      <xs:element minOccurs=”0″ maxOccurs=”unbounded” name=”EmptyRow_AfterHeader” nillable=”true” type=”xs:string”>
      <xs:annotation>
      <xs:appinfo>
      <b:fieldInfo justification=”left” sequence_number=”2″ />
      </xs:appinfo>
      </xs:annotation>
      </xs:element> 

      Example:
      If I add an element for empty rows after <Header> called <EmptyRow_AfterHeader> and uses the file above I get the result below.

       <THEFile xmlns=”http://kkk“>
      <Header xmlns=””>
      <Head1>
      <Root_Child1_Child1>headValue1</Root_Child1_Child1>
      </Head1>
      <Head2>
      <Root_Child2_Child1>headValue1</Root_Child2_Child1>
      </Head2>
      <Head3>
      <Root_Child3_Child1>headValue1</Root_Child3_Child1>
      </Head3>
      <Head4>
      <Root_Child4_Child1>headValue1</Root_Child4_Child1>
      </Head4>
      <Head5>
      <Root_Child5_Child1>headValue1</Root_Child5_Child1>
      <Root_Child5_Child2>headValue2</Root_Child5_Child2>
      </Head5>
      </Header>
      <EmptyRow_AfterHeader xmlns=””>#Body1_1 bodyValue1 “bodyValue2″</EmptyRow_AfterHeader>
      <EmptyRow_AfterHeader xmlns=””>#Body1_2 bodyValue1 bodyValue2</EmptyRow_AfterHeader>
      <EmptyRow_AfterHeader xmlns=””>#Body2 bodyValue1 bodyValue2</EmptyRow_AfterHeader>
      <EmptyRow_AfterHeader xmlns=””>#Body3 bodyValue1</EmptyRow_AfterHeader>
      </THEFile>

    • #23974

      What I need is a way of validating a flat file that might contain empty rows or not.

      I need the file to keep the empty rows and therefor I can’t remove all the empty rows in the receive pipeline.

      Can anyone lead me in the right direction?

      /Charles

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