02-16-2017 03:29 PM
I want to take all records from the below file out where name variable as a certain phrase like "abc1".
In the file the new file will contain record 2 and 3 in the file below.
Thank you so much.
Data have; input name $ 20.; datalines; cost_ab value_abc1 textabc12_x testabc ; run;
02-16-2017 03:57 PM
You can use either function contains, as proposed by @nehalsanghvi
or if index(name,'abc1') > 0
in case you are looking for digits in name you can use:
if indexc(name,'012345678') > 0
Need further help from the community? Please ask a new question.