Reputation: 535
I want to define a character array in SAS, I am following this paper. I actually want to have something like
ARRAY test {2} "10,5" "9,0"
so a character array where the characters are numeric. I have not defined them before and the paper they say:
Variables that are not previously defined as character variables will default to numeric variables unless they are defined as character variables within the ARRAY stat ement. To define character variables within the ARRAY statement, place a dollar sign ($) after the brackets and before any of the variables, as illustrated in this example
so
ARRAY test {2}$ $"10,5" $"9,0"
but ofcourse this also does not work. What do I have to change?
Upvotes: 0
Views: 2612
Reputation: 3315
try using parenthesis. something like below
data have;
ARRAY test {2} $ ("10,5", "9,0");
run;
Upvotes: 2