I’m trying to define an array using the following code:
data all_dates;
array arr[*] _temporary_ (1 2 3 4 5);
run;
It gives me this message:
ERROR: The non-variable based array arr has been defined with zero elements.
Looking at the documentation examples I can’t see why this wouldn’t work. Am I doing something wrong or is this just not allowed? If it’s not allowed what is an alternative equivalent method?
Ah nevermind – the documentation actually does state:
I guess I’ll have to count the number of elements I’ll need beforehand and then use: