Hello Everyone,
I am trying to create an index on a new data set where I have a new variable.
Here is the code that I have so far:
data work.all_staff (index=Age_Hired);
set orion.sales orion.nonsales;
Age_Hired =(year(Hire_Date)-year(Birth_Date));
run;
So I am trying to create an index on the new variable Age_Hired, and I get the following message in my log:
ERROR 23-7: Invalid value for the INDEX option.
I am not sure where I am going wrong with this or if I cannot create a new index against a new variable (which would seem silly since that is a problem on my homework assignment )
Could someone please let me know where I am going wrong with my code?
Thanks,
Alisa
even when we want only a single simple index, the data set option value should appear in (parentheses), like
index=( age_hired )
even when we want only a single simple index, the data set option value should appear in (parentheses), like
index=( age_hired )
Hi Peter!
Thanks for letting me know what was wrong with my code.
Thanks!
Alisa
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.