title: Recursion in Array SAS
body: <p>I have an existing collection of variables a_0,...,a_45 where a_i represents the amount of stuff I have on day i. I'd like to create a new collection of variables b_0,...,b_45 to represent the incremental change in stuff I have on day i (i.e. b_k=a_k-a_(k-1) ). My approach:</p>
  
  <pre><code>data test;
      set dataset;
      array a a_0-a_45;
      array b b_0-b_45;
      b(1)=a(1);
      do i=2 to 45;
          b(i)=a(i)-a(i-1);
      end;
  run;
  </code></pre>
  
  <p>However my b variables just come out missing. </p>