title: Only output columns with differences Proc Compare
body: <p>I have the following code:</p>
  
  <pre><code>proc compare base=Old_Data compare=New_Data
  out=Comp_Data outnoequal outbase outcomp outdif noprint criterion=0.0001;
  id Test_ID;
  run;
  </code></pre>
  
  <p>where i have the following datasets:</p>
  
  <p>Old_Data</p>
  
  <pre class="lang-none prettyprint-override"><code>Test_ID  Var1   Var2
  
  0000001  1234   4567
  
  0000002  1111   45
  </code></pre>
  
  <p>New Data</p>
  
  <pre class="lang-none prettyprint-override"><code>Test_ID  Var1   Var2
  
  0000001  1234   4567
  
  0000002  1110   45
  </code></pre>
  
  <p>In the output file i get the following:</p>
  
  <pre class="lang-none prettyprint-override"><code>_TYPE_   _OBS_ Test_ID  Var1   Var2
  
  BASE     2     0000002  1111   45
  
  COMPARE  2     0000002  1110   45
  
  DIF      2     0000002  -1     E
  </code></pre>
  
  <p>When I want to get the following:</p>
  
  <pre class="lang-none prettyprint-override"><code>_TYPE_   _OBS_ Test_ID  Var1
  
  BASE     2     0000002  1111 
  
  COMPARE  2     0000002  1110
  
  DIF      2     0000002  -1  
  </code></pre>
  
  <p>How do i get the code to automatically do this rather then me manually checking and then dropping <code>var2</code>?</p>