01-30-2016 09:28 PM
I'm trying to the following code in the latest SAS University Edition and I just get '.' for the new log transformed column. The code works if the data is under a datalines statement. Any help would be appreciated.
filename REFFILE "/folders/myshortcuts/stats1/unit3/EducationData.xlsx" termstr=CR; proc import datafile=REFFILE dbms=XLSX out=incomedata replace; getnames=YES; run; proc print data=incomedata(obs=10); run; data lndata; set incomedata; lnIncome = log(income); proc print data=lndata; run;
01-31-2016 02:21 PM
I did modify the income variable name to the one in the Excel file, Income2005. It still didn't work. Here is the output your requested.
02-01-2016 09:44 AM
01-30-2016 09:56 PM
Please post your log if you're encountering errors.
Most likely the cause is something ahead of the data step, in the proc import.
My guess would be the variable isn't actually called income, but is something else in the Excel file.
Running a proc contents as @mohamed_zaki has indicated will show you the variable name and label. Make sure you're using the variable name.