Microsoft Knowledge Base Email Alertz

KBAlertz.com: The flat file output may not contain the flat file delimiters as expected in BizTalk Server 2006 and in BizTalk Server 2004

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]

Search KbAlertz

Advanced Search

Webmasters
Put kbAlertz on your website.
[ Click Here for more! ]





ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
KBAlertz referrals get
** SIX MONTHS FREE **


Community Site



We Send hundreds of thousands of emails using ASP.NET Email


ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
KBAlertz referrals get
** SIX MONTHS FREE **




Mentioned In








Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks




Article ID: 914590 - Last Review: May 3, 2006 - Revision: 1.1

The flat file output may not contain the flat file delimiters as expected in BizTalk Server 2006 and in BizTalk Server 2004

SYMPTOMS

In Microsoft BizTalk Server 2006 and in Microsoft BizTalk Server 2004, the flat file output may not contain the flat file delimiters as expected. This behavior may occur when you process a message by using a custom pipeline that contains the Flat File Assembler pipeline component.

For example, if the message that the custom pipeline processes contains a missing record, the flat file output may not contain the flat file delimiters. The flat file delimiters may not appear in the output file depending on the position of the missing record in the input file.

WORKAROUND

To work around this behavior, use a map and a custom scripting functoid to make sure that an empty record is created when the input file does not contain the record. To do this, follow these steps:
  1. Set the following properties on the potentially empty nodes in the document schema for the Flat File Assembler pipeline component:
    • Set the Preserve Delimiter for Empty Data property to the Yes value.
    • Set the Suppress Trailing Delimiter property to the No value.
    • On the root node, set the Generate Empty Nodes property to the True value.
  2. Add a new map to the BizTalk project. In this map, use the document schema for the Flat File Assembler pipeline component as the source schema and as the destination schema.
  3. In the map that you created in step 2, map the source fields that are not empty to the corresponding destination fields.
  4. For the fields that may be empty in the input file, use a scripting functoid to return an empty string when the record is missing. The following code example for the scripting functoid demonstrates how to do this.
    public string ValOrEmpty(string val)
    {
         return (val.Length > 0) ? val : "";
    }
    
    Note You must create a script that has a unique function name for each potentially empty field that you map. For example, if you have three potentially empty fields, you may have functions that are named the following:
    • The ValOrEmpty1 function
    • The ValOrEmpty2 function
    • The ValOrEmpty3 function

STATUS

This behavior is by design.

APPLIES TO
  • Microsoft BizTalk Server 2006 Standard Edition
  • Microsoft BizTalk Server 2006 Enterprise Edition
  • Microsoft BizTalk Server 2006 Developer Edition
  • Microsoft BizTalk Server 2004 Standard Edition
  • Microsoft BizTalk Server 2004 Developer Edition
  • Microsoft BizTalk Server 2004 Enterprise Edition
  • Microsoft BizTalk Server 2004 Partner Edition
Keywords: 
kbcode kbbts kbtshoot kbprb KB914590
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Bruno Nikolic Reported as Irrelevant  
Written: 5/11/2006 8:45 PM
Article ID : 914590 There is another way to achieve the same result by using just one Mass Copy functoid. Stick to all of the prerequisites and in your map link up the two root nodes with a Mass Copy functoid.

(Optional) Name

(Optional) Public URL Or Email

Comments
No HTML -- Text Only Please