title: Proc compare - comparing variables in two datasets that have different sizes and different variable placement
body: <p>So, I have a significant problem with proc compare. I have two datasets with the two columns. One column lists table names and the other one - names of variables which correspond to table names from the first column. I want compare values of one of them based on the values of first column. I somewhat made it work but the thing is that these datasets have different sizes due to additional values in one of them. Which means that some new variable was added in the middle of a dataset (new variable was added to a table). Unfortunately, proc compare compares values from two datasets horizontally and checks them against each other for values, so in my case it looks like this:</p>
  
  <pre><code>ds 1 | ds 2
  
  cost | box_nr
  
  other | cost_total
  </code></pre>
  
  <p>As you can see, a new value <code>box_nr</code> was added to the second dataset that appears above the value  that I want it to compare variable <code>cost</code> to (<code>cost_total</code>). So I would like to know if it's possible to compare values (check for differences in character sequence) that have at least minimal similarity - for example 3 letters (cos) or if it's possible to just put values like <code>box_nr</code> at the end suggesting that they don't appear in a certain dataset. </p>
  
  <p>My code:</p>
  
  <pre><code>PROC Compare base=USERSPDS.MIzew compare=USERSPDS.MIwew
      out=USERSPDS.result outbase outcomp outdif noprint; 
      id 'TABLE  HD'n;
      where ;
  run; 
  
  proc print data=USERSPDS.result noobs;
     by 'TABLE  HD'n;
     id 'TTABLE  HD'n;
     title 'COMPARISON:';
  run; 
  </code></pre>