@animesh123 wrote: If Cp1=psg and psg-seg= land and cp2 ="" then rank=2 else rank=1
Replace IF with CASE WHEN, clean up the syntax after THEN
case when Cp1=psg and psg-seg= land and cp2 ="" then 2 else 1 end as rank
As pointed out by @PeterClemmensen you can't use this in a DATA step, only in PROC SQL
-- Paige Miller
Register Today!
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.