View Full Version : A SAS question


a little boy
05-15-2009, 11:42 PM
Hi everyone,

I am a novice in SAS programming, and I found a error in executing the code below:

data prob12;
length ssn 9 ansal 5 age 2 race $ 1;
input ssn ansal age race $;
datalines;
123874414 28000 35 W
646239182 29500 37 B
012437652 35100 40 W
018451357 26500 31 W
;
proc means data = prob12;
var ansal age;
run;
proc print data = prob12;
run;

I found in the log the following error:

Error: variable ansal in the list does not match type prescribed for this list.

Could anyone explain where the problem is to me ? Thanks in advance!!:)

lumhearts
05-16-2009, 10:07 AM
If you delete your second line of code, it will work.