Hi Tom, Thank you for pointing that out! After I change 6. to 1. and the issue is solved: data mydata;
set mydata;
film1 = put(film, 1.); *the key is here;
run; then data mydata;
length filmname & 16.;
set mydata;
if film1= '1' then filmname = 'batman';
else if film1 = '2' then filmname = 'goodwillhunting';
run;
... View more