As others have indicated, the statements will run without error. However, there is a flaw. If those statements are creating a new variable named PRODUCT, it will be defined as two characters long. The first mention of PRODUCT (= 'EC') defines its length. So the values you will get are "EC", "bc", and "ot". The fix is simple: add your own LENGTH statement before SAS sets the length for you:
data test;
set test2;
length product $ 7;
if card_type = 'F' then product = 'EC';
else if customer = 'C' then product = 'bc_card';
else if card_type in ('dg', 'dp', 'bg') then product = 'others';
run;
The length of 7 allows room for the longest value being assigned ("bc_card").
... View more