02-02-2017 04:30 AM
data work.systems; set work.carsales; if prxmatch('m/Acura|Dodge|Ford/oi',Manufacturer) > 0 then found=1; else found=0; run;
I've tried to run above code and in result I got a new dataset with found=0 only... as I want to do pattern matching so prxmatch should be there..
02-02-2017 04:47 AM - edited 02-02-2017 04:50 AM
I don't have access to your source data, but when I run
data work.systems; set sashelp.cars; if prxmatch('m/Acura|Quattro|Ford/oi',model) > 0 then found=1; else found=0; run;
it works fine.
If you want to get fast accurrate solutions, posting the data you're using is recommended. It's fortunate there's a similar dataset in sashelp.
02-02-2017 05:04 AM - edited 02-02-2017 05:07 AM
hey thanks for reply...actually im using bit old sas version i.e SAS 9.0... so does this makes any impact while running the code? @LaurieF
02-02-2017 05:13 AM
These are the modifier which work in 9.1,
Sorry, 9.0 is so antiquated they had to have documentatioon on stone tablets. Seriously, upgrade there is no benefit to staying on an old version.