Flat File with header and trailer
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server General > Flat File with header and trailer




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    RE: Flat File with header and trailer  
Stephen W. Thomas


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-27-05 10:51 PM

Hello.

I would guess that your problem is with the Trailer Schema.  If you do not
have a delimiter after your trailer, you would not want that to be post
fixed.  Infex might work.

Something else that might help is to use a tool like ultra edit.  It will
allow you to see the hex values inside your file so you know if you are
getting a CR or a CRLF.

Hope this helps.

Stephen W. Thomas
http://www.biztalkgurus.com


"Brian Cesafsky" wrote:

> I have a flat file that has a header, body, and trailer.  The header recor
d
> is a 23 byte positional record with a line feed to end it.  The body recor
d
> is a 250 byte positional record with a line feed to end a record (the body
> record is unbounded, but I do NOT set the maxoccurs to be 'unbounded'
> because I need to promote a property).  The trailer record is a 51 byte
> positional record with NOTHING that ends the record.
>
> For the header record, I set the structure property to 'delimited', the
> child order property to Postfix, and the child delimiter to 0x0A (line fee
d)
> for the root node, and then create a positional record for the fields
>
> For the body record, I do the same as the header record
>
> For the  trailer record, I set the structure property to 'delimited', the
> child order property to Postfix, and the child delimiter to None for the
> root node, and then create a positional record for the fields
>
> I get this error:
> There was a failure executing the receive pipeline: "test.MovisoReceive"
> Source: "Flat file disassembler" Receive Location:
> "E:\Projects\BizTalk\test\IN\*.txt" Reason: Unexpected end of stream while
> looking for:
> Positional data (length is 8)
> The current definition being parsed is MovisoRecord. The stream offset whe
re
> the error occured is 22163. The line number where the error occured is 90.
> The column where the error occured is 51.
>
>
> My guess is that BizTalk thinks I'm still processing 'body' records, but I
> don't know how to tell BTS that it has reached my trailer record.
>
> For testing, I create a receive pipeline and use a flat file disassembler.
> I set the Document, Header (preserve = false), and Trailer schemas to the
> appropriate schemas I created.
>
>
> NOTE:  The input (.txt) file is being created on a Unix box I believe, so
> there is only a Line Feed (no carriage returns) after each record
>
> Thanks in advance, Brian
>
>
>





[ Post a follow-up to this message ]



    Re: Flat File with header and trailer  
Brian Cesafsky


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-27-05 10:51 PM

Yep, that is the issue, there is no delimiter after the trailer.  I have
used Ultra Edit to verify that.  I tried Infix, but had the same error.

Still struggling...

"Stephen W. Thomas" <StephenWThomas@discussions.microsoft.com> wrote in
message news:C121441B-8E8F-45C4-BB26-B2C63B2E2D68@microsoft.com...[vbcol=seagreen]
> Hello.
>
> I would guess that your problem is with the Trailer Schema.  If you do not
> have a delimiter after your trailer, you would not want that to be post
> fixed.  Infex might work.
>
> Something else that might help is to use a tool like ultra edit.  It will
> allow you to see the hex values inside your file so you know if you are
> getting a CR or a CRLF.
>
> Hope this helps.
>
> Stephen W. Thomas
> http://www.biztalkgurus.com
>
>
> "Brian Cesafsky" wrote:
> 







[ Post a follow-up to this message ]



    Re: Flat File with header and trailer  
Stephen W. Thomas


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-27-05 10:51 PM

Hello.

Did you try changing the parsing mode?  The trailer doesn’t have a tag
identifier you can set does it?

Are your header and details both also marked as Post fixed?  I think they
would want to be infixed as well.

Stephen W. Thomas
http://www.biztalkgurus.com


"Brian Cesafsky" wrote:

> Yep, that is the issue, there is no delimiter after the trailer.  I have
> used Ultra Edit to verify that.  I tried Infix, but had the same error.
>
> Still struggling...
>
> "Stephen W. Thomas" <StephenWThomas@discussions.microsoft.com> wrote in
> message news:C121441B-8E8F-45C4-BB26-B2C63B2E2D68@microsoft.com... 
>
>
>





[ Post a follow-up to this message ]



    Re: Flat File with header and trailer  
Brian Cesafsky


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-27-05 10:51 PM

I'm not sure how the tag identifier works... in the flat file, the first 2
characters does control what 'type' of record it is (01=header, 02=detail,
03=trailer)... do I put those values in for the tag identifier?

there is a line feed after the header, and each detail record... I have both
of those set to postfix...

I will try setting all to infixed.

One question... do I set the tag identifier on the rott record, or the
record under the root (or both?

Thanks!



"Stephen W. Thomas" <StephenWThomas@discussions.microsoft.com> wrote in
message news:6B253413-7540-4C23-89BB-B8B6FBA40E5F@microsoft.com...[vbcol=seagreen]
> Hello.
>
> Did you try changing the parsing mode?  The trailer doesn't have a tag
> identifier you can set does it?
>
> Are your header and details both also marked as Post fixed?  I think they
> would want to be infixed as well.
>
> Stephen W. Thomas
> http://www.biztalkgurus.com
>
>
> "Brian Cesafsky" wrote:
> 







[ Post a follow-up to this message ]



    Re: Flat File with header and trailer  
Stephen W. Thomas


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-27-05 10:51 PM

Hello.

Yep, you should be able to use those values as tag identifiers.  That will
tell the parser what type of record it is looking for.

I think you’d need the Header and Details set to Post fixed – that means
 the
delimited it after the record.  Leave the Trailer as Infix – that means it
doesn’t have delimiters in front or behind it.

If all else fails, you can send me your project and sample file and I can
take a look at it.  Just email it to swthomas@NOSPAMbiztalkgurus.com – jus
t
remove the nospam part.

Stephen W. Thomas
http://www.biztalkgurus.com


"Brian Cesafsky" wrote:

> I'm not sure how the tag identifier works... in the flat file, the first 2
> characters does control what 'type' of record it is (01=header, 02=detail,
> 03=trailer)... do I put those values in for the tag identifier?
>
> there is a line feed after the header, and each detail record... I have bo
th
> of those set to postfix...
>
> I will try setting all to infixed.
>
> One question... do I set the tag identifier on the rott record, or the
> record under the root (or both?
>
> Thanks!
>
>
>
> "Stephen W. Thomas" <StephenWThomas@discussions.microsoft.com> wrote in
> message news:6B253413-7540-4C23-89BB-B8B6FBA40E5F@microsoft.com... 
>
>
>





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:01 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register