New SAS user.
I have a data set in which I'd like to initialize, say, 100 new variables VAR101, VAR102... VAR200. Here's one thing I tried:
data stuff;
set a.stuff;
do i=101 to 200;
cat('var',put(i,3.)) = .;
end;
run;
I get the following errors:
ERROR: Undeclared array referenced: cat.
ERROR: Variable cat has not been declared as an array.
I've tried to do this in several different ways. This was the one that made the most sense to me, but none of them have been fruitful so far. (I tried putting an "input" statement around the "cat" too.)
How can I do this?
(What I'm actually trying to do is much more complex, but I can't even figure this out.)