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
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.
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:
- 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.
- 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.
- In the map that you created in step 2, map the source fields that are not empty to the corresponding destination fields.
- 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
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
| 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 |
|
|