Put in the implied parenthesis to see why your syntax does not work. WHEN ( (EquipmentID = 2825) and 2859) THEN 'KLM11P2' 2859 is always TRUE (SAS treats any non-zero value as TRUE). So you are only testing if EQUIPMENTID is equal to 2825. Use the IN operator.
... View more