Reputation: 375
I'm trying to read dataset that has 4030 observations and 23 variables. I'm doing that in proc fcmp, using read_array (...) statement. Most of the variables have character type, but when I'm trying to read the code:
proc fcmp;
array a[&Numobs., &Nvar.] / NOSYMBOLS ;
rcl = read_array ("input", a);
res = write_array ('output', a);
quit;
I get error for every character variable:
ERROR: Column "Variable2" in data set "WORK.input" is not numeric in function READ_ARRAY.
Does read_arrray work only for numeric variables? What am I doing wrong? (the rest of my code is simple, and I'm sure it's correct).
I am using SAS Enterprise Guide 4.3.
Upvotes: 0
Views: 379
Reputation: 21
Read_array and write_array are numeric only. By default you're reading in all columns, but you can specify which columns you're interested in using quoted strings.
Upvotes: 1
Reputation: 797
In SAS all variables in an array must be of the same data type. Your Variable1 is probably numeric, Variable2 is character.
Upvotes: 1