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!
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.