MainframeSupports
tip week 35/2007:

Some years ago a good friend of mine told me about the COMPARE command in ISPF EDIT/VIEW. I have been a great fan of this command ever since. COMPARE (may be abbreviated COMP) compares data in your EDIT/VIEW session with the contens of a dataset or member. COMPARE uses SuperC to perform the comparison and always in line compare mode which means that data in the EDIT/VIEW session are compared with the external data line by line.

If you conduct a COMP without parameters a panel is displayed in which you may configure your compare. So far I have been satisfied with the defaults and have not investigated the options on this panel. If you want to carry out a comparison you must enter a member or dataset name after COMP. The parameter is used in exactly the same manner as described in COPY/REPLACE/CREATE. Only difference is that you can also use a *. * means that you compare with the contens of the dataset or member as it was when you started the EDIT/VIEW session. Using COMP * in fact gives you an overview of the changes you have made. Pretty clever I think.

If the comparison does not find any differences a message with the text "No differences found" appears and everybody is happy. If differences are found it gets a little harder. A message saying "Differences found" appears and data around the first difference is displayed. Lines in your EDIT/VIEW session not equal to not or appearing in the external data have been assigned labels in the line command area. Lines in the external data not equal to or not appearing in your EDIT/VIEW session are displayed as socalled information lines in your EDIT/VIEW session. Information lines are identyfied by ======== in the line command area. These lines are NOT part of your data. It has taken some time for me to get used to those extra lines and all the labels.

When differences are found it is nice to know that the RESET command removes all the ======== lines and that RESET LABELS removes all the labels (also the ones you may have set yourself; nothing is free). You can change information lines into real data lines using the MD (make data) line command. A very handy command is the COMP EXCLUDED command that excludes all the equal lines unless a few ones around the lines with differences. The COMP EXCLUDED command makes it easy to find all the differences.

Previous tip in english        Sidste danske tip        Tip list