Positional comparison for fixed-width flat files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bob Gaydos
    New User
    • Dec 2017
    • 2

    Positional comparison for fixed-width flat files

    Is there a way of telling BC4 to compare strictly on the basis of character positions when doing a text compare of two fixed-width flat files? Sometimes the comparator identifies "sameness" which is really a change, and this is apparent to the human who knows the fixed-width nature of the file. It appears that BC is treating these changes as more of a spelling correction than anything else.

    For example, the left side of my BC session has 20171001 starting in column 1427. In the same position on the right side it reads 00000000.

    If one views this as a word, then the argument could be made that the spelling was corrected and the two adjacent zeros were common to both the left- and right-side files. If one views this positionally, then clearly the rightmost character has changed from a 1 on the left to a 0 on the right, and overall the two sides would be color-highlighted as 20171001 and 00000000.
    Last edited by Bob Gaydos; 06-Dec-2017, 12:41 PM.
  • Aaron
    Team Scooter
    • Oct 2007
    • 16000

    #2
    Hello,

    In the Text Format, you can enable Column-based data in the Misc tab. You can click the Format button on the toolbar or in the Tools menu -> File Format dialog (then select your format or the default format, or create a new Text format). In the Misc tab, enable "column-based data".

    A file format is generally assigned to a specific file mask, such as *.ext or *.txt.
    Aaron P Scooter Software

    Comment

    • Bob Gaydos
      New User
      • Dec 2017
      • 2

      #3
      Thanks, Aaron - that did the trick!

      Comment

      Working...