Can you check upon this.
libname l '/folders/myfolders';
data carselect;
set l.permanent;
select(Manufacturer);
LENGTH country $200;
when("Honda","Lexus","Mitsubis","Infiniti") country = "Japan";
when("Hyundai") country=""SouthKorea";
when("BMW","Audi"," Mercedes") country = "germany";
when("Jaguar") country = "India";
when("Acura","Buick","Cadillac","Chevrole","Chrysler","Dodge","Ford","Jeep","Lincoln") country = "USA";
otherwise country = "other";
end;
run;
log
@rishabhmehra13 wrote:
....
when("Hyundai") country=""SouthKorea";....
Yes, removing the extra quote will solve one of the problems. But your syntax for SELECT statements is not valid. Here is an abbreviated version of what you will need to change:
length country $200;
select;
when(Manufacturer in ("Honda","Lexus","Mitsubis","Infiniti")) country = "Japan";
when(Manufacturer in ("Hyundai")) country=""SouthKorea";
when(Manufacturer in ("BMW","Audi"," Mercedes")) country = "germany";
...
otherwise country = "other";
end;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.