Working with the BizTalk Flat File Disassembler Video

I have put together a short 10 minute biztalk training video covering some of the different output options available using the Flat File Disassembler in Biztalk Server 2004. 

This video covers three different output options from the flat file disassembler. The three options covered are single detail records without a header or trailer, all detail records together without a header or trailer, or all details together with the header and trailer.

This video walks through the Flat File Disassembler Sample from a past post. It might be helpful to have the sample downloaded before watching the video.

I have the video available for live play via shock wave or downloadable via Windows Media Player.

Watch the video: Flat File Disassembler Output Options Video

Comments and feedback are strongly recommended.

Sequential Flat File Message Processing Lab

Here is a 45 minute, step-by-step lab showing how to use the Flat File Disassembler, Delivery Notification, and a Sequential Convoy to map a large flat file document in BizTalk 2004.  This lab will break up a large flat file into single messages, map each message, and write the ordered output to an output file.

This lab takes you through it in three Exercises.  It is based on Microsoft’s hands-on-labs.

Download: Sequential Message Processing Hands On Lab

Setup is simple.  Unzip the download to your c:\ drive and run the included binding file to create the send and receive ports used in the lab.  Make sure the root folder named “Microsoft Hands-On-Labs” is located at c:\.  The lab manual is located under \ILL010_Convoys.  The exercises are located in the \Source\Exercises folder.  The full solution is located in the \Source\Solution folder.

Although newbie’s to BizTalk can complete this lab, it covers advanced topics.  If you are new to BizTalk, do not get discouraged if you find this lab difficult. 

Flat File Schema Properties Now Easily Accessible in SP1

In addition to all the other cool stuff available in BizTalk Server 2004 Service Pack 1 is the addition of the Additional Flat File Schema Properties to the schema properties window when working with Flat Files. 

Now, properties like Allow Early Termination, Generate Empty Nodes, Lookahead Depth, Parse Optimization, and Suppress Empty Nodes can be set inside Visual Studios.  This will eliminate the tedious and error prone manual editing of the schema using notepad.  Error prone?  Yep, I messed this one up once…

Error Fixed In Flat File Disassembler Sample

Today I was working on some content for Tech Ed when I found a major error in a sample I posted about 4 months ago. 

The error caused the CR-LF’s between records to be included in the positional character count during debatching and actually into the messages themselves.  This through off the file layout but did not give any errors.  In fact, the expected result of three files were received.  They just did not have the right data in them. 

I have seen similar problems in the past were the Flat File Disassembler does not behave in any way as I would expect.

Below is before and after screen shots of the schema.

Before: After:         

The error is easily fixed by added an additional node into the schema that is Delimited, Post Fixed with CR-LF as the Hexadecimal delimiter.  This fix was required in both the Header and SingleRecord schemas.

The updated sample is available for download.

Download: Flat File Disassembler Sample
Watch the video: Flat File Disassemblier Output Options Video

Flat File Disassembler Output Types in BizTalk Server 2004

I have seen a lot of posts on various news groups over the past few months about the Flat File Dissembler and how it produces output.  I think it is rather confusing so I put together a sample that I hope will shed some light on the subject.

Download: Flat File Disassembler Output Sample
Watch the video: Flat File Disassemblier Output Options Video

The Flat File Disassembler is used to convert flat file documents (either positional, delimited, or a supported combination) into XML based on a defined schema.  The schema must import the Flat File Schema Extensions and have all the required delimiters and positions set, of course.  Flashback: This type of conversion was accomplished using envelops in BizTalk 2002.

The Flat File Disassembler can take in a large batch file and produce either one large XML output or single record Xml outputs.  This is the confusing part… The control of this is based on how the schema is defined and how the properties are set on the Flat File Disassembler inside the Receive Pipeline.

Producing One XML Output

In order to produce one output file, simply define a single schema with the required Header, Body (make sure this is set to 1 to many), and Trailer records.  Then, set the Document Schema property inside the Receive Pipeline Disassembler component to this schema.  Do not set anything for the Header or Trailer Schema.  This will produce one output based on the input file. 

In my sample, this is illustrated in schema AllAsOne.xsd and AllAsOneNoHeader.xsd.  The accompanying pipelines are recAllAsOne.btp and recAllAsOneNoHeader.btp.

Producing Single Message Output

In order to produce a single XML document per input record, the Header, Body, and Trailer records will need to be defined as separate schemas.  Then, each of these will need to set accordingly inside the Receive Pipeline Disassembler component. The base Body message should be set to the Document Schema property.  

In my sample, this is illustrated in schema AllAsOne.xsd and AllAsOneNoHeader.xsd.  The accompanying pipelines are recAllAsOne.btp and recAllAsOneNoHeader.btp.

Inside the sample, pay special attention to the Receive Pipelines.  Note the differences in the setting and the schema to return a single record verses one file.  The sample includes both a flat file with a Header and one with just Body records.  To run the sample, see the ReadMe.txt. I have included 4 Orchestrations to allow for easy Receive and Send Port creation.