5 96 /*put into 3 buckets*/ 97 data claims2; 98 set claims; 99 if PracticeName="Unknown" then ProvCategory="Not MMM"; 100 else if PracticeName like "SonorTouch%" then ProvCategory="SonorTouchTech"; ____ 388 76 ERROR 388-185: Expecting an arithmetic operator. ERROR 76-322: Syntax error, statement will be ignored. 101 else ProvCategory="Private"; 102 run;
IS there something else to use other than like?
LIKE only works in Proc SQL or the WHERE clause in a data step
If you want to check to see if a value begins with a specific text value use:
else if PracticeName =: "SonorTouch" then ProvCategory="SonorTouchTech";
Note the : after the =, that means "begins with"
LIKE only works in Proc SQL or the WHERE clause in a data step
If you want to check to see if a value begins with a specific text value use:
else if PracticeName =: "SonorTouch" then ProvCategory="SonorTouchTech";
Note the : after the =, that means "begins with"
Thank you!
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.