BizTalk Server General - Record delimiter for a Positional Flat File

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > February 2005 > Record delimiter for a Positional Flat File





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Record delimiter for a Positional Flat File
Jeff Wessling

2005-02-01, 5:59 pm

I'm creating a schema for a positional flat file, however each record ends
with 0x0D0A (CRLF). How can I set this end-of-record delimiter in a
positional file?

Thanks in advance,
- Jeff


Danny Buysse

2005-02-01, 5:59 pm

You will need to create a delimited top record with your delimiter and then
underneath this record create your positional records.

Danny.
http://dannybuysse.blogspot.com/

"Jeff Wessling" wrote:

> I'm creating a schema for a positional flat file, however each record ends
> with 0x0D0A (CRLF). How can I set this end-of-record delimiter in a
> positional file?
>
> Thanks in advance,
> - Jeff
>
>
>

Bob Corcoran

2005-02-01, 5:59 pm

Jeff,

I've written a few positional flat file formats. This is what works for me.
The example I will use is for a typical Header, Body and Trailer record
format.

1. Add a new schema and rename the root node to something relevant.
2. Set the following properties in the root node:
Child Delimeter = 0x0D 0x0A
Child Delimeter Type = Hexadecimal
3. Right click the root node, and select Insert Schema Node/Child Record
4. Name the node Header (or anything you want)
5. Set the Structure field to Positional
6. Right click the 'Header' record and select Insert Schema Node/Child Field
Element
7. Name the element and set its properties as needed
8. Repeat steps 6 and 7 for each field in the 'Header' record
9. Repeat steps 3-7 for each record type required.

Hope that helps,
Bob

"Danny Buysse" wrote:
[vbcol=seagreen]
> You will need to create a delimited top record with your delimiter and then
> underneath this record create your positional records.
>
> Danny.
> http://dannybuysse.blogspot.com/
>
> "Jeff Wessling" wrote:
>
Jeff Wessling

2005-02-02, 2:50 am

Thanks guys, you rule. That worked great! I managed to get around the
problem by adding in an element at the end of the schema to read the 0x0d
0x0a which let things line up again correctly, but this is obviously better.
Thanks again. - Jeff

"Bob Corcoran" <BobCorcoran@discussions.microsoft.com> wrote in message
news:833F6BDA-2D7E-4B54-AEFD-FC8A62348373@microsoft.com...[vbcol=seagreen]
> Jeff,
>
> I've written a few positional flat file formats. This is what works for
> me.
> The example I will use is for a typical Header, Body and Trailer record
> format.
>
> 1. Add a new schema and rename the root node to something relevant.
> 2. Set the following properties in the root node:
> Child Delimeter = 0x0D 0x0A
> Child Delimeter Type = Hexadecimal
> 3. Right click the root node, and select Insert Schema Node/Child Record
> 4. Name the node Header (or anything you want)
> 5. Set the Structure field to Positional
> 6. Right click the 'Header' record and select Insert Schema Node/Child
> Field
> Element
> 7. Name the element and set its properties as needed
> 8. Repeat steps 6 and 7 for each field in the 'Header' record
> 9. Repeat steps 3-7 for each record type required.
>
> Hope that helps,
> Bob
>
> "Danny Buysse" wrote:
>


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com