Help using Base SAS procedures

Variable in list does not match type prescribed for this list.

Accepted Solution Solved
Reply
Contributor
Posts: 69
Accepted Solution

Variable in list does not match type prescribed for this list.

 

Hello

I tried to run the following code:

 

proc means data=sasuser.sasfile190616;

var TAssets Sales FDtotalFF IDtotalFF ODtotalFF FDtotalFNF IDtotalFNF ODtotalFNF Firmdefi FOWNFF FINFF OTHERFF FOWNFNF FINFNF OTHERFNF ROA Q SalesGro RDSales LTassets LN(Assets) NIAssets CAPAXS LTSTEquity Divsales Marexpsales FirmAgeissue Beta;

class FIRMDEFI;

run;

 

And got the following errors (more than that, but all of them with the same reason):

ERROR: Variable FDtotalFNF in list does not match type prescribed for this list.

ERROR: Variable IDtotalFNF in list does not match type prescribed for this list.

ERROR: Variable ODtotalFNF in list does not match type prescribed for this list.

 

These variables are numeric but have a lot of missing values because each of this variable describe only one class out of 3.

What I have to do in order to get the proc means

 

Thanks a lot! 

 

 


Accepted Solutions
Solution
‎06-19-2016 06:12 AM
Super User
Posts: 17,898

Re: Variable in list does not match type prescribed for this list.

The log is telling you they are not numeric. Run a proc contents and verify this. Convert them into numeric variables then use proc means. 

View solution in original post


All Replies
Solution
‎06-19-2016 06:12 AM
Super User
Posts: 17,898

Re: Variable in list does not match type prescribed for this list.

The log is telling you they are not numeric. Run a proc contents and verify this. Convert them into numeric variables then use proc means. 

New Contributor
Posts: 2

Re: Variable in list does not match type prescribed for this list.

I'm having the same isssue. I've checked my data that's stored in excel and the header is text (the variable I'm interested in) and the samples are stored as numbers but SAS still states the same issue as discussed above. 

Contributor
Posts: 69

Re: Variable in list does not match type prescribed for this list.

Deae @KTstarter

 

I did as they mentioned above, it means that my code was:

 

proc contents data=sasuser.yael1;

run;

 

I found that variables that I thought and also looked like numbers were actually text. I really do not know why it happened, but I changed it in excel to numbers and copied again to SAS as numbers.

 

I hope it will helps

 

 

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 3231 views
  • 1 like
  • 3 in conversation