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;
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.