Mike T G

I am building a flatfile in BT06 and here is the issue that has got me stumped. In this flatfile there will be Segment(s) that are optional if they show up or not. So on these segment(s), I set the min occurances to 0 and I tested an actual document against the specs and no issues. So I built a map using the specs and in testing the map with the very same document, the only data that actual showed up on the output document was before the optional segment and when I took out the optional segment(s) from the specs then all the data (before and after) showed up on the out bound document.

Any one know why this might have occured Is there a setting at the Root Node I may need to set to by empty segments

Additional information on this flatfile...there are line identifiers (tags) that are being used for each different segment.

Thanks for any help



Re: BizTalk R2 General Flat Files that include optional Segments

Mick Badran - MVP

Mike - are you able to post a mock up of your file and schema

Optional sections are always a challenge -the fact you have tag ids is great Smile






Re: BizTalk R2 General Flat Files that include optional Segments

SaravanaKumar_1977

Is that flat file is positional or delimited based If positional based you have to send empty space and for delimited based you have to delimited character in the place of optional field.

Thanks,

Saravana Kumar





Re: BizTalk R2 General Flat Files that include optional Segments

Mike T G

Saravana - this would a complete segment that would be optional not a field and the segment would be delimited (in this case tab) and so what happens if there is no data for the segment everything after that segment does not get populated through the map but once I remove that option segment from the specs then everything works just fine---This document would be an inbound document. There will be at times when on the same document a segment may or may not be sent and as long we do not make that segment madatory BT06 should not care if that segment is there or not.

Thanks for taking a look





Re: BizTalk R2 General Flat Files that include optional Segments

Mike T G

Saravana, see example below - where the second example would process all information and the first ex. would process only the FH and OH segments

FH CONF 06/08/2007
OH 0009995999 00 901434795 000 3226539 06/12/2007
OI 0009995999 263834 001 000 004 00000.000 00002.600 0 0000
OI 0009995999 216674 002 001 000 00044.050 00000.000 0 0000
OI 0009995999 750239 003 001 000 00037.120 00000.000 0 0000
FF CONF

FH CONF 06/08/2007
OH 0009995999 00 901434795 000 3226539 06/12/2007
OT 0009995999 002 Item 263834 will be 1 case short
OI 0009995999 263834 001 000 004 00000.000 00002.600 0 0000
OI 0009995999 216674 002 001 000 00044.050 00000.000 0 0000
OI 0009995999 750239 003 001 000 00037.120 00000.000 0 0000
FF CONF






Re: BizTalk R2 General Flat Files that include optional Segments

SaravanaKumar_1977

Hi Mike,

Sorry for late reply. went out of town. give me sometime, I will get back you...

Thanks,

Saravana Kumar