Thank you. That did help. However, I'm still a little stuck. I'm supposed to have 473 observations. I changed the second line from "if" to Else "if" and I had more observations show, but still not all 473. Any ideas? Code: data profoot.pro_football_segments;
set profoot.pro_football_groups;
Length segment $ 15;
label segment = 'Customer Purchase Segments';
if bought_other_merch='Yes' and bought_sweatshirt='Yes' and bought_team_hat='Yes' and bought_team_tshirt='Yes' then segment='All Merch';
else if bought_other_merch='No' and bought_sweatshirt='No' and bought_team_hat='No' and bought_team_tshirt='No' then segment='No Merch';
Else if 'Some Merch';
run; Log after running that data step with length format included: 1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; 61 62 data profoot.pro_football_segments; 63 set profoot.pro_football_groups; 64 Length segment $ 15; 65 label segment = 'Customer Purchase Segments'; 66 if bought_other_merch='Yes' and bought_sweatshirt='Yes' and bought_team_hat='Yes' and bought_team_tshirt='Yes' then 66 ! segment='All Merch'; 67 else if bought_other_merch='No' and bought_sweatshirt='No' and bought_team_hat='No' and bought_team_tshirt='No' then 67 ! segment='No Merch'; 68 Else if 'Some Merch'; 69 run; NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column). 68:10 NOTE: Invalid numeric data, 'Some Merch' , at line 68 column 10. Fan_ID=10153 Bought_Team_Hat=Yes Bought_Team_TShirt=Yes Bought_Other_Merch=No Bought_Sweatshirt=Yes payment_method=Team Website dollars_spent=155 H=. i=5 gender=Male age=46 Marital_Status=Married Game_Attendance=Season Ticket Holder games_attended=8 Age_bracket=40s segment= _ERROR_=1 _N_=1 NOTE: Invalid numeric data, 'Some Merch' , at line 68 column 10. Fan_ID=10246 Bought_Team_Hat=Yes Bought_Team_TShirt=No Bought_Other_Merch=Yes Bought_Sweatshirt=Yes payment_method=Team Website dollars_spent=190 H=. i=5 gender=Female age=19 Marital_Status=Single Game_Attendance=Attends Less Than 50% of Games games_attended=1 Age_bracket=Under 20 segment= _ERROR_=1 _N_=2 NOTE: Invalid numeric data, 'Some Merch' , at line 68 column 10. Fan_ID=10591 Bought_Team_Hat=Yes Bought_Team_TShirt=Yes Bought_Other_Merch=Yes Bought_Sweatshirt=No payment_method=Stadium Credit dollars_spent=135 H=. i=5 gender=Female age=24 Marital_Status=Married Game_Attendance=Attends More Than 50% of Games games_attended=5 Age_bracket=20s segment= _ERROR_=1 _N_=3 NOTE: Invalid numeric data, 'Some Merch' , at line 68 column 10. Fan_ID=10791 Bought_Team_Hat=Yes Bought_Team_TShirt=Yes Bought_Other_Merch=Yes Bought_Sweatshirt=No payment_method=Team Website dollars_spent=135 H=. i=5 gender=Male age=42 Marital_Status=Married Game_Attendance=Attends Less Than 50% of Games games_attended=2 Age_bracket=40s segment= _ERROR_=1 _N_=4 NOTE: Invalid numeric data, 'Some Merch' , at line 68 column 10. Fan_ID=11319 Bought_Team_Hat=Yes Bought_Team_TShirt=No Bought_Other_Merch=Yes Bought_Sweatshirt=No payment_method=Team Website dollars_spent=105 H=. i=5 gender=Male age=32 Marital_Status=Single Game_Attendance=Attends Less Than 50% of Games games_attended=3 Age_bracket=30s segment= _ERROR_=1 _N_=5 NOTE: Invalid numeric data, 'Some Merch' , at line 68 column 10. Fan_ID=11925 Bought_Team_Hat=Yes Bought_Team_TShirt=No Bought_Other_Merch=Yes Bought_Sweatshirt=No payment_method=Stadium Credit dollars_spent=105 H=. i=5 gender=Female age=35 Marital_Status=Single Game_Attendance=Attends Less Than 50% of Games games_attended=1 Age_bracket=30s segment= _ERROR_=1 _N_=6 NOTE: Invalid numeric data, 'Some Merch' , at line 68 column 10. Fan_ID=12532 Bought_Team_Hat=Yes Bought_Team_TShirt=Yes Bought_Other_Merch=No Bought_Sweatshirt=Yes payment_method=Stadium Credit dollars_spent=155 H=. i=5 gender=Female age=48 Marital_Status=Single Game_Attendance=Attends Less Than 50% of Games games_attended=4 Age_bracket=40s segment= _ERROR_=1 _N_=9 NOTE: Invalid numeric data, 'Some Merch' , at line 68 column 10. Fan_ID=12539 Bought_Team_Hat=Yes Bought_Team_TShirt=Yes Bought_Other_Merch=Yes Bought_Sweatshirt=No payment_method=Stadium Credit dollars_spent=135 H=. i=5 gender=Female age=50 Marital_Status=Single Game_Attendance=Attends More Than 50% of Games games_attended=7 Age_bracket=50s segment= _ERROR_=1 _N_=10 NOTE: Invalid numeric data, 'Some Merch' , at line 68 column 10. Fan_ID=12978 Bought_Team_Hat=Yes Bought_Team_TShirt=Yes Bought_Other_Merch=Yes Bought_Sweatshirt=No payment_method=Team Website dollars_spent=135 H=. i=5 gender=Female age=25 Marital_Status=Married Game_Attendance=Attends More Than 50% of Games games_attended=7 Age_bracket=20s segment= _ERROR_=1 _N_=12 NOTE: Invalid numeric data, 'Some Merch' , at line 68 column 10. Fan_ID=13172 Bought_Team_Hat=Yes Bought_Team_TShirt=No Bought_Other_Merch=No Bought_Sweatshirt=No payment_method=Stadium Cash dollars_spent=40 H=. i=5 gender=Male age=25 Marital_Status=Married Game_Attendance=Attends Less Than 50% of Games games_attended=1 Age_bracket=20s segment= _ERROR_=1 _N_=14 NOTE: Invalid numeric data, 'Some Merch' , at line 68 column 10. Fan_ID=13308 Bought_Team_Hat=Yes Bought_Team_TShirt=No Bought_Other_Merch=Yes Bought_Sweatshirt=Yes payment_method=Stadium Credit dollars_spent=190 H=. i=5 gender=Female age=54 Marital_Status=Single Game_Attendance=Attends Less Than 50% of Games games_attended=1 Age_bracket=50s segment= _ERROR_=1 _N_=16 NOTE: Invalid numeric data, 'Some Merch' , at line 68 column 10. Fan_ID=13408 Bought_Team_Hat=Yes Bought_Team_TShirt=No Bought_Other_Merch=No Bought_Sweatshirt=No payment_method=Stadium Cash dollars_spent=40 H=. i=5 gender=Male age=68 Marital_Status=Married Game_Attendance=Attends Less Than 50% of Games games_attended=1 Age_bracket=60s segment= _ERROR_=1 _N_=17 NOTE: Invalid numeric data, 'Some Merch' , at line 68 column 10. Fan_ID=13668 Bought_Team_Hat=Yes Bought_Team_TShirt=Yes Bought_Other_Merch=No Bought_Sweatshirt=Yes payment_method=Stadium Cash dollars_spent=155 H=. i=5 gender=Female age=52 Marital_Status=Single Game_Attendance=Attends Less Than 50% of Games games_attended=1 Age_bracket=50s segment= _ERROR_=1 _N_=19 NOTE: Invalid numeric data, 'Some Merch' , at line 68 column 10. Fan_ID=13880 Bought_Team_Hat=Yes Bought_Team_TShirt=No Bought_Other_Merch=Yes Bought_Sweatshirt=Yes payment_method=Team Website dollars_spent=190 H=. i=5 gender=Male age=48 Marital_Status=Single Game_Attendance=Attends Less Than 50% of Games games_attended=1 Age_bracket=40s segment= _ERROR_=1 _N_=20 NOTE: Invalid numeric data, 'Some Merch' , at line 68 column 10. Fan_ID=14026 Bought_Team_Hat=No Bought_Team_TShirt=Yes Bought_Other_Merch=Yes Bought_Sweatshirt=No payment_method=Stadium Credit dollars_spent=95 H=. i=5 gender=Female age=64 Marital_Status=Married Game_Attendance=Attends More Than 50% of Games games_attended=6 Age_bracket=60s segment= _ERROR_=1 _N_=22 NOTE: Invalid numeric data, 'Some Merch' , at line 68 column 10. Fan_ID=14109 Bought_Team_Hat=No Bought_Team_TShirt=Yes Bought_Other_Merch=No Bought_Sweatshirt=Yes payment_method=Team Website dollars_spent=115 H=. i=5 gender=Female age=65 Marital_Status=Married Game_Attendance=Season Ticket Holder games_attended=8 Age_bracket=60s segment= _ERROR_=1 _N_=23 NOTE: Invalid numeric data, 'Some Merch' , at line 68 column 10. Fan_ID=14202 Bought_Team_Hat=Yes Bought_Team_TShirt=Yes Bought_Other_Merch=Yes Bought_Sweatshirt=No payment_method=Stadium Credit dollars_spent=135 H=. i=5 gender=Female age=51 Marital_Status=Married Game_Attendance=Attends Less Than 50% of Games games_attended=4 Age_bracket=50s segment= _ERROR_=1 _N_=24 NOTE: Invalid numeric data, 'Some Merch' , at line 68 column 10. Fan_ID=14507 Bought_Team_Hat=Yes Bought_Team_TShirt=No Bought_Other_Merch=Yes Bought_Sweatshirt=No payment_method=Team Website dollars_spent=105 H=. i=5 gender=Male age=48 Marital_Status=Single Game_Attendance=Attends More Than 50% of Games games_attended=5 Age_bracket=40s segment= _ERROR_=1 _N_=25 NOTE: Invalid numeric data, 'Some Merch' , at line 68 column 10. Fan_ID=14730 Bought_Team_Hat=Yes Bought_Team_TShirt=Yes Bought_Other_Merch=Yes Bought_Sweatshirt=No payment_method=Stadium Credit dollars_spent=135 H=. i=5 gender=Male age=52 Marital_Status=Married Game_Attendance=Season Ticket Holder games_attended=8 Age_bracket=50s segment= _ERROR_=1 _N_=26 NOTE: Invalid numeric data, 'Some Merch' , at line 68 column 10. WARNING: Limit set by ERRORS= option reached. Further errors of this type will not be printed. Fan_ID=14799 Bought_Team_Hat=Yes Bought_Team_TShirt=No Bought_Other_Merch=Yes Bought_Sweatshirt=No payment_method=Team Website dollars_spent=105 H=. i=5 gender=Female age=55 Marital_Status=Single Game_Attendance=Attends Less Than 50% of Games games_attended=3 Age_bracket=50s segment= _ERROR_=1 _N_=27 NOTE: There were 473 observations read from the data set PROFOOT.PRO_FOOTBALL_GROUPS. NOTE: The data set PROFOOT.PRO_FOOTBALL_SEGMENTS has 94 observations and 16 variables. NOTE: DATA statement used (Total process time): real time 0.01 seconds cpu time 0.02 seconds 70 71 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; 84
... View more