BizTalk Server General - Flat File unbounded schema problem

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > January 2005 > Flat File unbounded schema problem





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 Flat File unbounded schema problem
Paul

2005-01-13, 5:51 pm

I'm trying to validate a flat file schema, but get the error: Unexpected end
of stream while looking for: '\n' current definition being parsed is DETAIL.
If I remove the unbounded property in Group Max Occurs in the Detail record's
property, the file parses fine. The flat file will have multiple records
which I've defined in the Detail of the schema. The FT1 record can occur
multiple times in a row before the next iteration of the Detail begins. I
need to read the value in FT1 field 16. I will post the schema in a reply
post. Any ideas why when adding the unbounded property this fails? Thanks
in advance!

Slimmed down version of the test file:
FHS|^~\&|RH|MEDI|ALL|HOSP|20041223|||||||
BHS|^~\&|RH|MEDI|ALL|HOSP|20041223|||||||
MSH|^~\& |MEDI|UHOSP|HOST|HOSP|20041223||DFT^P03|
1|T|2.3|||||||
EVN|P03|20041223|20041223||
PID|1|||||M||||
FT1||1|20041222|20041222|20041223|CHARGE
|03105|||1|||RH|||91040||I||12366|||||||
|
MSH|^~\& |MEDI|UHOSP|HOST|HOSP|20041223||DFT^P03|
2|T|2.3|||||||
EVN|P03|20041223|20041223||
PID|1|||||||F||
FT1||2|20041222|20041222|20041223|CHARGE
|03502705|||1|||RH|||91039||R||12454||||
||||
MSH|^~\& |MEDI|UHOSP|HOST|HOSP|20041223||DFT^P03|
3|T|2.3|||||||
EVN|P03|20041223|20041223||
PID|1|||||||M||
FT1||3|20041222|20041222|20041223|CHARGE
|03230422|||1|||RH|||91040||I||12436||||
||||
FT1||4|20041222|20041222|20041223|CHARGE
|03230430|||1|||RH|||91040||I||6900|||||
|||
MSH|^~\& |MEDI|UHOSP|HOST|HOSP|20041223||DFT^P03|
295|T|2.3|||||||
EVN|P03|20041223|20041223||
PID|1|||||||F||
FT1||707|20041222|20041222|20041223|CHAR
GE|03110038|||1|||RH|||91040||I||12436||
||||||
FT1||708|20041222|20041222|20041223|CHAR
GE|03214061|||1|||RH|||91040||I||6900|||
|||||
FT1||709|20041222|20041222|20041223|CHAR
GE|03230398|||1|||RH|||91040||I||9426|||
|||||
BTS|1|End of Batch 1|709^1016||
FTS|1|End of Charge File|||

Paul

2005-01-13, 5:51 pm

Here is the schema:
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://Medilink_Billing.Parsed_Medilink_to_Allegra"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
targetNamespace="http://Medilink_Billing.Parsed_Medilink_to_Allegra"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:appinfo>
<b:schemaInfo count_positions_by_byte="false" standard="Flat File"
root_reference="Root" />
<schemaEditorExtension:schemaInfo namespaceAlias="b"
extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension"
standardName="Flat File"
xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions" />
</xs:appinfo>
</xs:annotation>
<xs:element name="Root">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited"
preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false"
sequence_number="1" child_order="default" child_delimiter_type="hex"
child_delimiter="0x0A" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
<xs:element name="HEADER">
<xs:annotation>
<xs:appinfo>
<b:recordInfo sequence_number="1" structure="delimited"
preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false"
child_order="default" child_delimiter_type="hex" child_delimiter="0x0A" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="1">
<xs:annotation>
<xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
<xs:element name="FHS">
<xs:annotation>
<xs:appinfo>
<b:recordInfo sequence_number="1" structure="delimited"
preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false"
child_order="default" child_delimiter_type="hex" child_delimiter="0x0A" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
<xs:element name="FHSdata" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="1"
justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="BHS">
<xs:annotation>
<xs:appinfo>
<b:recordInfo sequence_number="2" structure="delimited"
preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false"
child_order="default" child_delimiter_type="hex" child_delimiter="0x0A" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
<xs:element name="BHSdata" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="1"
justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="DETAIL">
<xs:annotation>
<xs:appinfo>
<b:recordInfo sequence_number="2" structure="delimited"
preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false"
child_order="default" child_delimiter_type="hex" child_delimiter="0x0A" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:annotation>
<xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
<xs:element name="MSH">
<xs:annotation>
<xs:appinfo>
<b:recordInfo sequence_number="1" structure="delimited"
preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false"
child_order="default" child_delimiter_type="hex" child_delimiter="0x0A" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
<xs:element name="MSHdata" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="1"
justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="EVN">
<xs:annotation>
<xs:appinfo>
<b:recordInfo sequence_number="2" structure="delimited"
preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false"
child_order="default" child_delimiter_type="hex" child_delimiter="0x0A" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
<xs:element name="EVNdata" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="1"
justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PID">
<xs:annotation>
<xs:appinfo>
<b:recordInfo sequence_number="3" structure="delimited"
preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false"
child_order="default" child_delimiter_type="hex" child_delimiter="0x0A" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
<xs:element name="PIDdata" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="1"
justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="FT1">
<xs:annotation>
<xs:appinfo>
<b:recordInfo sequence_number="4" structure="delimited"
preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false"
child_order="default" child_delimiter_type="hex" child_delimiter="0x0A" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
<xs:element name="FT1data" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="1"
justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="TRAILER">
<xs:annotation>
<xs:appinfo>
<b:recordInfo sequence_number="3" structure="delimited"
preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false"
child_order="default" child_delimiter_type="hex" child_delimiter="0x0A" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="1">
<xs:annotation>
<xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
<xs:element name="BTS">
<xs:annotation>
<xs:appinfo>
<b:recordInfo sequence_number="1" structure="delimited"
preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false"
/>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
<xs:element name="BTSdata" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="1"
justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="FTS">
<xs:annotation>
<xs:appinfo>
<b:recordInfo sequence_number="2" structure="delimited"
preserve_delimiter_for_empty_data="true" suppress_trailing_delimiters="false"
child_order="default" child_delimiter_type="hex" child_delimiter="0x0A" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
<xs:element name="FTSdata" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="1"
justification="left" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>


"Paul" wrote:

> I'm trying to validate a flat file schema, but get the error: Unexpected end
> of stream while looking for: '\n' current definition being parsed is DETAIL.
> If I remove the unbounded property in Group Max Occurs in the Detail record's
> property, the file parses fine. The flat file will have multiple records
> which I've defined in the Detail of the schema. The FT1 record can occur
> multiple times in a row before the next iteration of the Detail begins. I
> need to read the value in FT1 field 16. I will post the schema in a reply
> post. Any ideas why when adding the unbounded property this fails? Thanks
> in advance!
>
> Slimmed down version of the test file:
> FHS|^~\&|RH|MEDI|ALL|HOSP|20041223|||||||
> BHS|^~\&|RH|MEDI|ALL|HOSP|20041223|||||||
> MSH|^~\& |MEDI|UHOSP|HOST|HOSP|20041223||DFT^P03|
1|T|2.3|||||||
> EVN|P03|20041223|20041223||
> PID|1|||||M||||
> FT1||1|20041222|20041222|20041223|CHARGE
|03105|||1|||RH|||91040||I||12366|||||||
|
> MSH|^~\& |MEDI|UHOSP|HOST|HOSP|20041223||DFT^P03|
2|T|2.3|||||||
> EVN|P03|20041223|20041223||
> PID|1|||||||F||
> FT1||2|20041222|20041222|20041223|CHARGE
|03502705|||1|||RH|||91039||R||12454||||
||||
> MSH|^~\& |MEDI|UHOSP|HOST|HOSP|20041223||DFT^P03|
3|T|2.3|||||||
> EVN|P03|20041223|20041223||
> PID|1|||||||M||
> FT1||3|20041222|20041222|20041223|CHARGE
|03230422|||1|||RH|||91040||I||12436||||
||||
> FT1||4|20041222|20041222|20041223|CHARGE
|03230430|||1|||RH|||91040||I||6900|||||
|||
> MSH|^~\& |MEDI|UHOSP|HOST|HOSP|20041223||DFT^P03|
295|T|2.3|||||||
> EVN|P03|20041223|20041223||
> PID|1|||||||F||
> FT1||707|20041222|20041222|20041223|CHAR
GE|03110038|||1|||RH|||91040||I||12436||
||||||
> FT1||708|20041222|20041222|20041223|CHAR
GE|03214061|||1|||RH|||91040||I||6900|||
|||||
> FT1||709|20041222|20041222|20041223|CHAR
GE|03230398|||1|||RH|||91040||I||9426|||
|||||
> BTS|1|End of Batch 1|709^1016||
> FTS|1|End of Charge File|||
>

Paul

2005-01-13, 5:51 pm

Me again, I found that if I used Tag identifiers, since I will always have
the first three characters that seemed to clear my problem. For example,
BHS, FT1, etc. I also changed the unbounded property from group max occurs
under advandced property to max occurs under general properties. I'm still
curious what other solutions there might be to solve this problem. Thanks.


"Paul" wrote:

> I'm trying to validate a flat file schema, but get the error: Unexpected end
> of stream while looking for: '\n' current definition being parsed is DETAIL.
> If I remove the unbounded property in Group Max Occurs in the Detail record's
> property, the file parses fine. The flat file will have multiple records
> which I've defined in the Detail of the schema. The FT1 record can occur
> multiple times in a row before the next iteration of the Detail begins. I
> need to read the value in FT1 field 16. I will post the schema in a reply
> post. Any ideas why when adding the unbounded property this fails? Thanks
> in advance!
>
> Slimmed down version of the test file:
> FHS|^~\&|RH|MEDI|ALL|HOSP|20041223|||||||
> BHS|^~\&|RH|MEDI|ALL|HOSP|20041223|||||||
> MSH|^~\& |MEDI|UHOSP|HOST|HOSP|20041223||DFT^P03|
1|T|2.3|||||||
> EVN|P03|20041223|20041223||
> PID|1|||||M||||
> FT1||1|20041222|20041222|20041223|CHARGE
|03105|||1|||RH|||91040||I||12366|||||||
|
> MSH|^~\& |MEDI|UHOSP|HOST|HOSP|20041223||DFT^P03|
2|T|2.3|||||||
> EVN|P03|20041223|20041223||
> PID|1|||||||F||
> FT1||2|20041222|20041222|20041223|CHARGE
|03502705|||1|||RH|||91039||R||12454||||
||||
> MSH|^~\& |MEDI|UHOSP|HOST|HOSP|20041223||DFT^P03|
3|T|2.3|||||||
> EVN|P03|20041223|20041223||
> PID|1|||||||M||
> FT1||3|20041222|20041222|20041223|CHARGE
|03230422|||1|||RH|||91040||I||12436||||
||||
> FT1||4|20041222|20041222|20041223|CHARGE
|03230430|||1|||RH|||91040||I||6900|||||
|||
> MSH|^~\& |MEDI|UHOSP|HOST|HOSP|20041223||DFT^P03|
295|T|2.3|||||||
> EVN|P03|20041223|20041223||
> PID|1|||||||F||
> FT1||707|20041222|20041222|20041223|CHAR
GE|03110038|||1|||RH|||91040||I||12436||
||||||
> FT1||708|20041222|20041222|20041223|CHAR
GE|03214061|||1|||RH|||91040||I||6900|||
|||||
> FT1||709|20041222|20041222|20041223|CHAR
GE|03230398|||1|||RH|||91040||I||9426|||
|||||
> BTS|1|End of Batch 1|709^1016||
> FTS|1|End of Charge File|||
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com