Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Flat file schema wizard
- This topic has 1 reply, 1 voice, and was last updated 9 years, 1 month ago by
community-content.
-
AuthorPosts
-
-
February 7, 2008 at 6:59 PM #18896
Hi Guys,
I am new to BizTalk Srever 2006 and was wondering if it would be possible for you to quickly take a look at the problem I am facing. I would appreciate your help in any possible way.
Below is sample data from a fixed length data file I get from the Mainframe. The first record always is a Header Level record which has the Mainframe batch name. The last record in the file is always a footer record that always beings with a 9999. No other line in the data file ever starts with 9999 except the footer.
CAM7011 252500002485000000001+00000000000+TCB-TN3270-RMS/WORK ORDER PRINTER 252500002499000000042+00000000000+TCB-OTHER 800100002488000000005+00000000000+TCB-WE ACSR/IPG-SINGLE REGION 800420002488000000040+00000000000+TCB-WE ACSR/IPG-SINGLE REGION 801122002499000000001+00000000000+TCB-OTHER 802020002499000000003+00000000000+TCB-OTHER 897210002499000000002+00000000000+TCB-OTHER 879810002499000000001+00000000000+TCB-OTHER
……… 999900001283000011112700000000000
Data File format (in detail) is as follows:
First row is the Header
Detail Section –
Column 1-8 is Customer#, 9-12 is TransactonCode, 13-21 – Volume, 22 – plus/minus (+/-) sign, 23-33 – Amount, 34 – plus/minus (+/-) sign and 35-75 – Description
Last row is the Footer record with columns: 1-4 hardcoded to 9999, 5-12 – Total # of rows in the detail section, 13-22 – Total Volume, 23-38 – Total Amounts
I am trying create an output instance (XML file) with the following structure:
Schema
|_Root
|_ Header
|_ Customer#
|_ TransactonCode
|_ Volume
|_ Amount
|_ Description
I created Source.xsd and Destination.xsd files. I also created a Map file to map the elements from Source and Destination .xsd files. ‘Validate Map’ works fine and so does ‘Test Map’
My problem arises when I try to use a Mainframe file with fewer or more number of data rows in the detail section. Lets consider that we delete any one row from the detail section of the above mainframe data file. If I then try to click ’Test Map’ I get the following error.
Invoking component…
C:\Tutorial\Filedrop\FlatFile\InFolder\G0001V00: error btm1041: Native Parsing Error: Unexpected end of stream while looking for:
Positional data (length is 8)
The current definition being parsed is Footer. The stream offset where the error occured is 97585. The line number where the error occured is 1285. The column where the error occured is 1.
Test Map failure for map file <file:///C:\Tutorial\Lessons\FlatFileExample1\FlatFileSchema\Map.btm>. The output is stored in the following file: <file:///C:\Tutorial\Filedrop\FlatFile\OutFolder\OutputFile.xml>
Component invocation succeeded.
I noticed that in the Properties of the Source.xsd file ’Detail ’ Child Record has Min Occurs and Max Occurs set to 1283 (These are the total # of records in the details section in the current sample file). I tried removing those values. I also tried to set ‘Min Occurs’ to 1 and ‘Max occurs’ to unbounded but still the same result.
Any ideas what I am missing ? Any kind of help is greatly appreciated. If anybody needs I can send them step-by-step screen shots.
Thanks for your help !
-
February 13, 2008 at 12:32 PM #18926
Using the Tag identifier for the Footer record worked. Also for the detail record, I had set set Mincount to 1 and maxcount to ‘unbounded’
Thanks.
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.