Hi, I have a data set that gives me Race as as R1, R2, R3, R4, and R5. How do I format it to: R1 = American Indian/Alaskan Native, R2 = Asian, R3 = Black or African American, or R4 = Native Hawaiian or Other Pacific Islander, and R5 = White? When I used a format code is on variables R1, R2, R3, R4, and R5 either get uninitialized or all the columns comes up as American Indian/Alaskan Native. This is the code that I use: data merge_dataset2; set merge_dataset; format RACE1-RACE5 $100.; if RACE1-RACE5 = R1 then RACE = "American Indian/Alaskan Native"; else if RACE1-RACE5 = R2 then RACE = "Asian"; else if RACE1-RACE5 = R3 then RACE = "Black or African American"; else if RACE1-RACE5 = R4 then RACE = "Native Hawaiian or Other Pacific Islander"; else if RACE1-RACE5 = R5 then RACE = "White"; run; Thanks
... View more