This is the code i Wrote after defining orion library.
data work.season;
set orion.customer_dim;
length Promo Promo2 $6;
qtr=qtr(customer_birthdate);
if qtr=1 then Promo="Winter";
else if qtr=2 then Promo="Spring";
else if qtr=3 then Promo="Summer"
else if qtr=4 then Promo="Fall";
if customer_age>=18 and customer_age<=25 then promo2="YA";
else if customer_age>=65 then promo2="Senior";
else promo2="Missing";
keep customer_firstname customer_lastname
customer_birthdate customer_age promo promo2;
run;
proc print data=work.season;
run;
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
57
58 data work.season;
59 set orion.customer_dim;
60 length Promo Promo2 $6;
61 qtr=qtr(customer_birthdate);
62 if qtr=1 then Promo="Winter";
63 else if qtr=2 then Promo="Spring";
64 else if qtr=3 then Promo="Summer"
65 else if qtr=4 then Promo="Fall";
____
388
76
ERROR 388-185: Expecting an arithmetic operator.
ERROR 76-322: Syntax error, statement will be ignored.
66 if customer_age>=18 and customer_age<=25 then promo2="YA";
67 else if customer_age>=65 then promo2="Senior";
68 else promo2="Missing";
69 keep customer_firstname customer_lastname
70 customer_birthdate customer_age promo promo2;
71 run;
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.SEASON may be incomplete. When this step was stopped there were 0 observations and 6 variables.
WARNING: Data set WORK.SEASON was not replaced because this step was stopped.