title: How to merge multiple datasets by common variable in SAS?
body: <p>I have multiple datasets. Each of them has different number of attributes. I want to merge them all by common variable. This is 'union' if I use proc SQL. But there is hunderds of variables.
  Example.</p>
  
  <pre><code>Dataset_Name    Number of columns   
  dataset1           110
  dataset2           120
  dataset3           130
  ...                ...
  </code></pre>
  
  <p>Say they have 100 columns in common. The final dataset which contains all dataset1,dataset2,dataset3..etc
  only has common columns(in this case, 100 columns).</p>
  
  <p>How do I do this?</p>
  
  <p>And how do I get columns for each dataset this is not in common with the final dataset. 
  example: dataset1 will have 10 columns that are not in the final dataset, and list the name of 10 columns.</p>
  
  <p>Thanks!!!!</p>