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?
thanks, it worked. I had some error but it was unrelated to your solution.
SAS Innovate 2025: Register Now
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9. Sign up by Dec. 31 to get the 2024 rate of just $495. Register now!