title: Concatenation vs Interleaving
body: <p>I cannot understand the difference between <code>interleaving</code> and <code>concatenation</code></p>
  
  <p>Interleaving </p>
  
  <pre><code>proc sort data=ds1 
             out=ds1;
     by var1;
  run;
  proc sort data=ds2 
             out=ds2;
     by var1;
  run;
   data testInterleaving ; 
   set ds1 ds2 ;
   run ;
  </code></pre>
  
  <p>Concatenation </p>
  
  <pre><code>data testConcatenation; 
     set ds1 ds2;
  run;
  </code></pre>
  
  <p>I tested these and the resulting datasets were exactly the same except for the order of observations which I think does not really matter. The two resulting datasets contain exactly the same observations. So, what is the difference, except for order?</p>