Announcement

Collapse
No announcement yet.

COBOL Source Compare

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • COBOL Source Compare

    Our shop is currently using BC2 and is evaluating BC3. Besides comparing data files, we use BC2 to compare modified source code to the original to document changes. OK, not the best method, but it beats the heck out of Panvalet compare!

    BC3 has a COBOL rule, but I just can't figure out how to modify it to successfully "mask" columns 1 - 6. The goal is to have BC3 simply ignore these columns.

    Using existing rules as a guide (the Help screens are just as useless in BC3 as they were in BC2), I created a rule based on columns:
    Line Number2=Column from 1 to 6

    In the Grammar Elements of the Session Settings, this rule is not checked. Guess what? It didn't mask columns 1 - 6 (It did set them to "unimportant differences", but the goal is to have them completely ignored!). Tried clicking it, no good - now they are important differences.

    Tried a new rule: Statement Area=Column from 7 to 72. Moved it to the top of the queue in Text Format - COBOL Source. Checked it and unchecked the Line Number2 rule: Still no go.

    Are there some type of manuals available that tells us how to set this up quickly and easily? If not, we won't be purchasing this product!

  • #2
    The default Cobol rule should ignore line numbers in the first 6 columns of Cobol files.

    To make sure it is ignored, open your Cobol files in the Text Compare. Select Session > Session Settings. Go to the Importance tab. Make sure "Line Number" is unchecked.

    Once you've configured your session settings, if View > Ignore Unimportant Differences is turned on, line number differences will show as a match. If it is turned off, line number differences will show in blue.

    The documentation for Beyond Compare 3 is available by selecting Help > Contents from the menu. There isn't a separate source of documentation available.

    Please let me know if my suggestion solves your problem.
    Chris K Scooter Software

    Comment


    • #3
      I may have messed up my default settings by trying to figure it out on my own.

      Here are my current grammar entries:

      Keyword=Text in list: ACCEPT,ACCESS,(and so on - didn't touch this one).
      Number=Text matching \d+(\.\d+)
      String=Text from " to "
      Comment=Text matching ^.{6}\*.*
      Operator=Text in list: <,<=,+,*,**,-,/,>,>=,=
      Line Number=Column from 73 to 80

      Under Session Settings, the following are checked:

      Keyword, Number, String, Comment, Operator.

      Line Number is Unchecked.

      On the same screen, only "Everything else" is checked.


      And I have read the entire supplied documentation. It isn't much help for this area. I did went to the link it contained "A Tao of Regular Expressions". Very interesting, but it was more about selection that de-selection. However, I did try to define the first six columns with

      Line Number2=Column 1 to 6

      and left it unchecked, but it didn't work, either.

      What I am trying to accomplish (and we are able to do this with BC2) is completely and totally ignore these first 6 columns. We don't want to see them in red; we don't want to see them in blue (I did manage to get them to blue a couple of times).

      On the other hand, that merge functionality looks totally awesome! I can't wait to get this resolved so I can give that a whirl!

      Comment


      • #4
        To return your Cobol file format to the default settings, select Tools > File Formats. Select "COBOL Source", then click the "Factory Defaults" button and click Save.

        Next, open your files in the Text Compare. Select Session > Session Settings and go to the Importance tab. Make sure "Line Number" is unchecked, then click OK.

        This should ignore differences in line numbers in the first 6 columns and in columns 73 to 80. Also make sure View > Ignore Unimportant Differences is turned on. This will make the line number differences show as a match. If you turn "Ignore Unimportant Differences" off, line number differences will show blue.
        Chris K Scooter Software

        Comment


        • #5
          Thank you, thank you! That did the trick!

          Comment

          Working...
          X