Hi Samuel,
Need some more clarification, "Lines starting with "01" indicate block headers, and "001",
"002" is the identification of the block."
1. Is there any value after 001, if yes then is it repeating value?
2. Can Item content repeat?
3. Is footer file is optional, because for block 001 footer file not present?
I have created schema with some input like below,
00|000000001|1954321|2015-09-07|20:34:00|1
01|000000002|001
02|000000003|123|Item1|1000|12345678901|2015-09-07|00:00:00
98|000000004|3|1000
99|000000008|8
01|000000005|002
02|000000006|254|12345678901
98|000000007|3
99|000000008|8
And generated schema below. Please verify. Do you want same schema. If Yes then it is simple to use Flat File Wizard and create schema. Refer
Flat File Schema creation with Tag Identifiers in the input flat file
repeating in a random fashion.
Walkthrough: Creating a Flat File Schema From a Document Instance
- <Root xmlns="http://FFProject.FlatFileSchema1">
- <HeaderFile xmlns="">
<HeaderFile_Child1>000000001</HeaderFile_Child1>
<HeaderFile_Child2>1954321</HeaderFile_Child2>
<HeaderFile_Child3>2015-09-07</HeaderFile_Child3>
<HeaderFile_Child4>20:34:00</HeaderFile_Child4>
<HeaderFile_Child5>1</HeaderFile_Child5>
</HeaderFile>
- <HeaderBlock xmlns="">
<HeaderBlock_Child1>000000002</HeaderBlock_Child1>
<HeaderBlock_Child2>001</HeaderBlock_Child2>
</HeaderBlock>
- <ItemContent xmlns="">
<ItemContent_Child1>000000003</ItemContent_Child1>
<ItemContent_Child2>123</ItemContent_Child2>
<ItemContent_Child3>Item1</ItemContent_Child3>
<ItemContent_Child4>1000</ItemContent_Child4>
<ItemContent_Child5>12345678901</ItemContent_Child5>
<ItemContent_Child6>2015-09-07</ItemContent_Child6>
<ItemContent_Child7>00:00:00</ItemContent_Child7>
</ItemContent>
- <FooterBlock xmlns="">
<FooterBlock_Child1>000000004</FooterBlock_Child1>
<FooterBlock_Child2>3</FooterBlock_Child2>
<FooterBlock_Child3>1000</FooterBlock_Child3>
</FooterBlock>
- <FooterFile xmlns="">
<FooterFile_Child1>000000008</FooterFile_Child1>
<FooterFile_Child2>8</FooterFile_Child2>
</FooterFile>
</Root>