Subject:Region start position (line versus byte) Author:Bardo Bardo Date:10 Sep 2008 04:44 PM
I have a file which has a header and detail region. Both regions have CRLF row delimiters and TAB field delimiters. The header has a number of fields such as dates where the data may be of variable length (the day and months are NOT padded with a leading 0). When I create the new region for the detail, I select “At row X” option. I would have thought this would tell the parser that this region ALWAYS begins at line number X. However, I then tried to use the same conversion file with a different input file, which had a date field in the header with a longer length. This caused the detail region to be parsed from the wrong position.
I then checked the conv file, and it appears that the region has still been configured with a starting CHARACTER number rather than line/row number. I saw this by looking at the <region><start> element value, which is configured with a number of 508. When I create a conversion file from scratch for the data file which did not parse correctly, this value is set to 497. The difference in numbers also appears to be the number of bytes the parser is incorrect by when it outputs the data in the first case.
Could you please tell me what I am doing wrong, as I would have thought this is a straightforward and common scenario.
The conversion files MUST support a date with varying length such as “1/6/2005 3:24:47 PM” and “10/20/2006 9:26:14 AM”.