BizTalk Server General - Getting a schema to parse correctly when Optional lines are missin

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > February 2006 > Getting a schema to parse correctly when Optional lines are missin





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 Getting a schema to parse correctly when Optional lines are missin
Klundell

2006-02-27, 5:51 pm

I have a flat file schema I am using to parse a message. The message has from
6 to 10 segments or lines in any give message. When some of the segments or
lines are not there the schema is not parsing correctly It will move the
segments or lines up in the Schema. For example give the following message
where each line is seperated by a carriage return -
MSH|data|data|data|data|data|data
EVN|data|data|data|data|data|data
PID|data|data|data|data|data|data
PV1|data|data|data|data|data|data
DG1|data|data|data|data|data|data (Optional segment)
IN1|data|data|data|data|data|data (Optional segment)

If the DG1 segment is not in the message but the IN1 segment is the parser
will move the In1 segment up to the DG1 space in the schema rather that
leaving the DG1 empty and keeping the In1 segment in the IN1 slot.
I have tried putting a tag on the properties for the segments but that does
not help.

The schema is too big to include but I can E-Mail if needed.The last 6
segments are optional and may not be in the message. How do I get the schema
to parse correctly when optional segments are missing ?

Thanks in advance.
Kris.

MaurĂ­cio Ritter

2006-02-28, 7:49 am

Hi Kludell,

Have you tried to create two types of records, one with the optional
segments and one withour it ? You can use a tag identifier to locate them if
its possible.

--
MaurĂ_cio Ritter
http://www.dotnetmaniacs.com.br


"Klundell" wrote:

> I have a flat file schema I am using to parse a message. The message has from
> 6 to 10 segments or lines in any give message. When some of the segments or
> lines are not there the schema is not parsing correctly It will move the
> segments or lines up in the Schema. For example give the following message
> where each line is seperated by a carriage return -
> MSH|data|data|data|data|data|data
> EVN|data|data|data|data|data|data
> PID|data|data|data|data|data|data
> PV1|data|data|data|data|data|data
> DG1|data|data|data|data|data|data (Optional segment)
> IN1|data|data|data|data|data|data (Optional segment)
>
> If the DG1 segment is not in the message but the IN1 segment is the parser
> will move the In1 segment up to the DG1 space in the schema rather that
> leaving the DG1 empty and keeping the In1 segment in the IN1 slot.
> I have tried putting a tag on the properties for the segments but that does
> not help.
>
> The schema is too big to include but I can E-Mail if needed.The last 6
> segments are optional and may not be in the message. How do I get the schema
> to parse correctly when optional segments are missing ?
>
> Thanks in advance.
> Kris.
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com