Hi all, I am new using SAS, so probably this is a simple question, but I am stuck. I need to create a subset of a file by selecting observations for a specific name that contains a specific character string, let's say 'Smith'. for example, the data is like this: data test; input name $; datalines; Will, Smith Diana, Ross Diane, Keaton Sally, Field Willy, Thomas David, Platt Ana, Smith ; run; My code is like this: data test; set test; where name contains 'Smith'; run; proc print; run; The code works properly for names, like 'David', but I am interested in last names, like Smith. Unfortunately it is not working for last names. Any advice is welcome. Regards
... View more