DATA Step, Macro, Functions and more

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

Reply
New User
Posts: 1

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

Proc print data = raj.Employee_new;
VAR id gender bdate educ jobcat salary salbegin salbegin1 jobtime prevexp minority;
SUM salary;
BY gender;
run;

 

I am facing an error called Variable salary in list does not match type prescribed for this list. Raw data has Salary variable with $ sign.

Super User
Posts: 3,100

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

Your SALARY variable is defined as character but you are trying to SUM it which requires it to be numeric. Where did you source SALARY from? You can either source it again as numeric or convert it to numeric in SAS.

Ask a Question
Discussion stats
  • 1 reply
  • 145 views
  • 0 likes
  • 2 in conversation