Thursday, April 15, 2004 7:15 AM Jan Tielens

Positional Flat File Processing with BizTalk 2004: Early Termination

Here's a nice tip I found in the BizTalk newsgroup, which is a great resource for learning more about BizTalk. When you process positional flat files, BizTalk assumes that each line is completely filled with characters. For example you have two fields in your flat file: code (5 positions) and name (10 positions): BizTalk expects the file to look like this:

codeANameA12345<- end of line
codeBNameB     <- end of line

So even the name field of the second line only has 5 characters, the remaining 5 need to be filled with spaces. Suppose your file has the end of line directly after the contents of the name field ends:

codeANameA12345<- end of line
codeBNameB<- end of line

When you try to process this file, BizTalk will throw an exception: Unexpected data found while looking for:'\r\n'. David Downing (MSFT) has the solution: you can add the following annotation to the schemaInfo node:

allow_early_termination="true"

You'll have to edit the schema using a text editor because the BizTalk schema editor doesn't allow you to add this annotation. Now BizTalk will allow the last field to be early terminated. Christof Claessens suggests in a post that there are more of these undocumented hints, I'd love to see them published! :-)

Filed under:

Comments

# Positional Flat File Processing with BizTalk 2004: Early Termination

Wednesday, April 14, 2004 7:58 PM by TrackBack

# Two undocumented BizTalk Server 2004 tricks

Thursday, April 15, 2004 2:50 AM by TrackBack

Two undocumented BizTalk Server 2004 tricks

# Positional Flat File Processing with BizTalk 2004: Early Termination

Wednesday, April 21, 2004 7:48 PM by TrackBack

# re: Positional Flat File Processing with BizTalk 2004: Early Termination

Thursday, May 06, 2004 6:51 PM by Nar

it is truncating some part of white space, i am want o truncate all last white space...is it possible!!!!

Nar-

# Positional Flat File with Early Termination

Thursday, June 21, 2007 7:27 AM by Durron's Blog

For our customer we needed a optional fault description at the end of each line. Normaly BizTalk expect

# BizTalk 2004 problem: nillable fields in a positional flat file. | keyongtech

Pingback from  BizTalk 2004 problem: nillable fields in a positional flat file. | keyongtech