This discussion is archived
1 2 Previous Next 18 Replies Latest reply: Oct 31, 2013 11:26 PM by 950456 Go to original post RSS
  • 15. Re: xsd issue. multiple records with different values.
    PuneetRekhade Journeyer
    Currently Being Moderated

    I am not sure, if I understand this correctly..

    i need to read the space value instead of 71&73. (last fourth row in sample file)

    If you want to read the space, instead of "71" and "73", then, in conditionValue use "   " (spaces inside inverted commas)..

    The issue is in my original file after 71 the records goes on 7100089 as on.

    with xsd lenght 3, 710 does not match with particular condition value mentioned choice condition.

    I am confused, how does the record look like ?

    71 09/08/2013 field1 filed2 field3 field4

    OR

    7100089

  • 16. Re: xsd issue. multiple records with different values.
    950456 Newbie
    Currently Being Moderated

    Hi Puneeth,

     

    Thankyou very much for the support. I understood that  i confused you.

     

    i need to read the space value instead of 71&73. (last fourth row in sample file).

    For the above statement, I should also read space values as i read "71" & "73".


    I am able to figure it out the xsd. in differentiating and writing the data along with condition values.xsd is as fallows.


     

    <xsd:element name="Root-Element">

        <xsd:complexType>

          <xsd:choice maxOccurs="unbounded" nxsd:choiceCondition="${x}" nxsd:lookAhead="0"

           nxsd:scanLength="2" nxsd:assignTo="${x}">

            <xsd:element name="Header" type="xsd:string" nxsd:conditionValue="(== 71) or (== 73) and (!= 52) and (!= 54)"

                     nxsd:style="fixedLength"

                       nxsd:length="25"  nxsd:skipMode="after"        nxsd:skipUntil="${eol}" />

            <xsd:element name="DetailRecords" type="xsd:string"  nxsd:conditionValue="(== 72) or (== 74) "

                       nxsd:style="fixedLength"

                       nxsd:length="16"  nxsd:skipMode="after"        nxsd:skipUntil="${eol}" />

     

          

          </xsd:choice>

        </xsd:complexType>

      </xsd:element>

     

    But i still have issue while splitting the header and detail records. I did mapped header in transform activity.But it's writing all the headers in single line.

  • 17. Re: xsd issue. multiple records with different values.
    PuneetRekhade Journeyer
    Currently Being Moderated

    How does the "tranform" activity come into picture ?

  • 18. Re: xsd issue. multiple records with different values.
    950456 Newbie
    Currently Being Moderated

    I need only header data into one file. so i am using transform activity to read header data.

    Mapping only header data using for each loop in transform activity.using same xsd both in source and target adapters.

    i am able to write the header data.

     

    But the issue is, all the headers are written in same line instead of separate lines. how can i handle in transform activity to break each loop.

    i am not using assign activity for this scenario. because i need to append number of records. or i can use copy list in assign activity.

    while using copy list also i found the same issue. writing all the headers in single line.

1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points