@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
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Registration is open
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss. Register now and lock in 2025 pricing—just $495!