No announcement yet.

Fixed File format compares

  • Filter
  • Time
  • Show
Clear All
new posts

  • Fixed File format compares

    Howdy - Loving BC4 so far and just got my license!

    I'm doing a lot of work on fixed-format files and so far, BC4 is heads and shoulders over any other diff tool I've tried. I absolutely love the UI in general and the ability to define columns and ignore parts of the file for comparison purposes and the ruler view that lets me check actual fixed file character positions.


    Is there any way to use the grammar "rules" (used for deciding which columns area compared or ignored) to create a visual representation of "columns" in a fixed file format? My files are about 750 chars wide and that's pretty tough to track where one field starts and stops. But I have defined all my known columns so I can switch them on and off for comparison purposes (which is great!).

    Ideally, either some way to have some sort of feint vertical lines at various known column "stops" in the 2-file view or some way to carry that info into the table view would make finding specific columns (and confirming they line up) so much easier.

    If not, I'm still lightyears ahead of where I was before I found BC4!! But can't hurt to ask ;-)

    Thanks for a game changing tool!!


  • #2

    It sounds like you are using the Columns grammar elements for the Text Compare to define importance, and want that to also visually limit the file. The short answer is no for the Text Compare session, but maybe for the Table Compare session.

    The Table Compare can define a file format for either delimiters or fixed width definitions, in the Tools menu -> File Formats dialog, New + Table Format. Columns tab, Type: Fixed. Can you files be defined this way?

    The Table Compare presents data in rows and columns, where the Column importance can be set as Key, Standard, or Unimportant, and the column visibility is then controlled in the View menu -> Columns tab. Row visibility is controlled by the comparison display filters, and the comparison (sorting, etc) in the Session Settings. Note that a Key column must be unique (EmployeeID) or multiple combinations that form a unique ID (FirstName col + LastName col both marked), or the key can be disabled if the Session Setting is alignment is updated.
    Aaron P Scooter Software


    • #3
      That works really well!

      I tried table view before, but setting up the column widths, when there are a LOT of columns, is a little, well, 'fussier' (just a long list of numbers and you're not sure looking at it which column is which). I loved the grammar approach with the Fixed file format because I was able to define each column seperately and with a name, so it made coordinating 100+ fields a lot easier.

      That said, once I got this correct, it's obviously such a great way to do this!

      Few more questions, if possible:
      1) I was able to tie my previous grammar to a file type/extension so when I opened that file type, I got those column/grammar definitions. Is there a way to do that for opening in table view mode?

      2) If I can't tie the table column definitions to a file type, what/where are the column definitions "kept"? I noticed when I opened a new file, they seemed to have stuck around from a previous attempt at saving them.

      3) Is there a way to title the columns when defining the columns? My target data never has a header row in it, so I can't do it there, but was curious if there was a variant of the column widths syntax that also allowed a column header to be entered with the width.

      Thanks again - this tool has literally already saved me at least a dozen hours of tedious character counting and manual interpretation comparing fixed file formats. I can't wait to let it loose on CSV files next week!!



      • #4
        1) Yes, the new Table Format you created in the Tools menu -> File Formats dialog can have a custom name and a specific file extension assigned to it. Whichever file format in that dialog is topmost is the one that determines which viewer/format is used. The others can be selected manually by opening the specific viewer first, then selecting the format from the Session Settings dialog or the Toolbar's Rules/Format button, dropdown (or individually from each file pane's status bar format name). If your extension matches and is topmost, the Table Compare would be used when double clicking the files in the Folder Compare (or a Rules-based scan, etc).

        2) It sounds like maybe you edited the Everything Else format (used for the Table Compare whenever an extension doesn't match a defined Format, all the viewer types have them, they are at the bottom of the File Formats dialog list). If all your edits are here, scroll down to the bottom and select the table (purple table icon) Everything Else format, and use Save As to clone it into a new format (which you can then give a custom name and extension).

        3) This one is a Yes and No. Yes, you can give the titles custom names, but not as part of the File Format. Column names are saved as part of a specific session, and would only be used when loading that session like a bookmark, not when using the global file format for any file pair. To define custom titles, load a Table Compare session, load in your files, then go to the Session menu, Session Settings, Columns tab. From here there are three columns: name, left file, and right file. The left and right file columns are the actual column data and names from the file. The leftmost column is the displayed title column, and auto-populates from the column titles it finds, but is overridable.
        Aaron P Scooter Software