locked
Both delimited and positional record in Flat file schema in biztalk RRS feed

  • Question

  • Hi All,

    I have a Input schema like:

    <Orders>

    <Item>

    <ItemId>1234</ItemId>

    <ItemName>ABC</ItemName>........so on

    </Item>

    <Item>

    <ItemId>5678</ItemId>

    <ItemName>XYZ</ItemName>........so on

    </Item>

    </Orders>

    After mapping output file should be like

    |1234      |ABC       |

    |5678      |XYZ       |

    Here ItemId and ItemName has the positional length as 10.

    I have set the Child delimiter of Orders to CRLF, Item Structure type to Positional and set the all postional values for ItemId and ItemName. Currently what I am getting is like :

    1234      ABC

    5678      XYZ

    How to add pipe character also? Is it possible?

    Please help me on this.


    Tuesday, October 14, 2014 2:15 PM

Answers

  • In addition to Johns answer, if you want the delimiter to be like |1234      |ABC      |

    Set the following properties. In the Orders

    Child Delimiter  -> 0x7C 0x0D 0x0A (Pipe with CRLF)

    Child Delimiter type -> Hexadecimal

    Child Order -> Postfix

    In the Item

    Child Delimiter  -> |

    Child Delimiter type -> Character

    Child Order -> Prefix

    • Marked as answer by rocky._ Thursday, October 16, 2014 4:38 AM
    Tuesday, October 14, 2014 7:02 PM
  • Hi,

    Make <item> record in your schema as delimited only and use Minimum length with pad character to define length. Use | as an child delimiter on the <item> record that you must have created in the schema. Set child delimiter type of <item> as character i.e.

    Child Delimiter  -  |

    Child Delimiter type - Character

    Child Order - Postfix

    Hope it helps !!!

    _________________________________________

    Please indicate "Mark as Answer" or "Mark as Helpful" if this post has answered the question

    Regards,

    Rahul Madaan

    biztalkvillage.blogspot.com



    • Edited by Rahul_Madaan Wednesday, October 15, 2014 3:19 AM
    • Marked as answer by rocky._ Thursday, October 16, 2014 4:35 AM
    Tuesday, October 14, 2014 6:38 PM

All replies

  • Hi,

    Make <item> record in your schema as delimited only and use Minimum length with pad character to define length. Use | as an child delimiter on the <item> record that you must have created in the schema. Set child delimiter type of <item> as character i.e.

    Child Delimiter  -  |

    Child Delimiter type - Character

    Child Order - Postfix

    Hope it helps !!!

    _________________________________________

    Please indicate "Mark as Answer" or "Mark as Helpful" if this post has answered the question

    Regards,

    Rahul Madaan

    biztalkvillage.blogspot.com



    • Edited by Rahul_Madaan Wednesday, October 15, 2014 3:19 AM
    • Marked as answer by rocky._ Thursday, October 16, 2014 4:35 AM
    Tuesday, October 14, 2014 6:38 PM
  • So, what you really have is a delimited file with fixed length fields.  That's different from a Positional structure.

    Create the flat file schema as Delimited, then set Minimum Length with Pad Character, Pad Character Type and Pad Character to get your specified result.

    In a Map, you may have to explicitly trim and fields beyond the allowed length.

    • Proposed as answer by vdha Tuesday, October 14, 2014 6:56 PM
    Tuesday, October 14, 2014 6:44 PM
    Moderator
  • In addition to Johns answer, if you want the delimiter to be like |1234      |ABC      |

    Set the following properties. In the Orders

    Child Delimiter  -> 0x7C 0x0D 0x0A (Pipe with CRLF)

    Child Delimiter type -> Hexadecimal

    Child Order -> Postfix

    In the Item

    Child Delimiter  -> |

    Child Delimiter type -> Character

    Child Order -> Prefix

    • Marked as answer by rocky._ Thursday, October 16, 2014 4:38 AM
    Tuesday, October 14, 2014 7:02 PM
  • Hi Rahul,

    Thanx for your reply It got worked for me. One more change I made it like, set Child delimiter property of Orders record to 0x7C 0x0D 0x0A (Pipe with CRLF) as vdha suggetsed.

    Thursday, October 16, 2014 4:37 AM