I want to search through a character variable, find all of the observations that have the word "internet" and insert a 1 into the dummy variable created for those observations. Really I just need help searching one column for a string, but I cant find a function that I can reference a single column to.
Asked
Active
Viewed 154 times
0
-
1Did you look very hard at the [documentation](http://support.sas.com/documentation/cdl/en/allprodslang/63337/HTML/default/viewer.htm#titlepage.htm)? Perhaps the `INDEX` or `FIND` functions? – Joe Aug 19 '13 at 16:42
1 Answers
0
Try:
indicator_var = index(variable, "string")

Ferdinand.kraft
- 12,579
- 10
- 47
- 69

user2448666
- 329
- 1
- 6
- 14