run indeed, I've been using too much proc sql I'd say!
I'm not sure if I understand the code you've written. if I have var = 20 in the first datastep, how can I then use 1:20 in the second part and why would you write var = 21 in the first step, I don't see how that fits in?