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;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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!
Get started using SAS Studio to write, run and debug your SAS programs.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.