title: SAS Index function?
body: <p>Can anyone explain why the below piece of code gives two different values?</p>
  
  <pre><code>87   data _null_;
  88      length a b $14;
  89      a = 'ABC.DEF (X=Y)';
  90      b = 'X=Y';
  91      x = index(a,b);
  92      y = index('ABC.DEF (X=Y)','X=Y');
  93      put x y;
  94   run;
  
  0 10
  NOTE: DATA statement used (Total process time):
        real time           0.01 seconds
        cpu time            0.01 seconds
  </code></pre>
  
  <p>Thanks.</p>