Need help on natural code compare utility

Hi All,

I am trying to create a natural code compare utility using the way suggested in one of the topic from this forum. Like

  1. In the first step of my JCL using NATCOMP to get the natural object (both Original and modified) into a PS file.
ABCDO                             /* ORIGINAL CODE
ORILIB                              /* ORIGINAL CODE LIBRARY
ORIREG                             /* ORIGINAL CODE REGION
ABCDM                             /* NEW CODE
MODLIB                            /* NEW CODE LIBRARY
MODREG                           /* NEW CODE REGION
  1. Using SUPERC pgm (ISRSUPC) to compare the files.

But, If any line is inserted or deleted then line number of both object mismatches and due to that it gives lot of differences (just due to line number mismatch).I tried removing the line number from the code before compare it works but it won’t give the line number in comparison result. Could any one suggest the way to resolve this?

Also, how I can compare more than one object at single go.

Warm Regards,

I can understand your dilemma. If you include line numbers, they are all different where renumbering took place, but if you don’t, then you can’t find the line number reference to describe where the more meaningful results are telling you where the differences are.

My first thought is maybe for each object you can write two workfiles… one with line numbers and one without. Then when you do your comparison using the one without, you can also read along from the one with line numbers and pull the line number from that one.

Another thought… if your shop has Treehouse’s N2O product, it comes with an excellent source code comparison function that you can run online or batch. I don’t know if PAC has anything like it, but maybe you can check if you use that instead.

Unnecessary editorial comment withheld.

Hope this helps!

There is a useful tool called “winmerge” that I have used to get round this problem. You will need to extract the Natural source and download it to your PC.
When you install Winmerge include the plugins, then when running the compare you need to used the prediffer “ignore columns” plugin.
It’s a bit fiddly to set up but is a useful visual tool and will help you spot changes.

… and if you are lucky enough to own natural SPOD or NatOne the compare utility is a built-in functionality - linenumbers or not :wink:

Shows there are several possible ways to skin this cat. :slight_smile:

Set the SuperC parameter CMPCOL=5:80 to ignore the first 4 positions of the line.

To ignore embedded line references is much trickier. Few of the products out there do this.

Ultraedit gives you wonderful compare results (when you compare a .TXT version of your source code). Get your two codes in two datasets and transfer them on you local. Then use Ultraedit compare facility against it.

Thanks for your suggestions.

We do have SPOD in our shop but i did’t found the code compare option there.

For some odd (but probably good;-) reason, the Compare Plugin is not default in the installation. So you will need to “check” the compare utility in the installation prog. (just rerun in control panel “Add and Remove Programs”)
The compare PlugIn is just a shell for calling any external compare utillity like “examdiff.exe” or whatever utility you might want to use.
The installation instructions can be found here:

Hi Puru,

If you’re looking for an external compare utility to point the SPoD plugin at, I’d recommend you take a look at Adrian Carter’s excellent, Natural aware, ASCIIDiff utility. I use it all the time and have worked at many sites that swear by it. Best of all, it’s free. Go to to obtain a copy.


Graeme Lane

I can back up Graeme !
The examdiff has a more sexy GUI, but the Natural-awareness (of for instance comments) compensates heavily !!!