BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi

I want to compare one basic string with a number of strings, and identify the string which is most similar with the basic string. Is there a nice Macro facility or a SAS procedure that may manage this problem?
1 REPLY 1
GertNissen
Barite | Level 11
Have a look at these functions
- SOUNDEX Function -> http://support.sas.com/onlinedoc/913/getDoc/da/lrdict.hlp/a000245948.htm
- SPEDIS Function -> http://support.sas.com/onlinedoc/913/getDoc/da/lrdict.hlp/a000245949.htm

And these samples
- 24582 - Combine data sets based upon similar values -> http://support.sas.com/kb/24/582.html
Encode character strings using SOUNDEX to aid in combining the data based upon similar but not exact values.

- 33340 - Using DATA Step functions to check character values or variables for near equality -> http://support.sas.com/kb/33/340.html
Several DATA step functions can be used to quantify or measure the difference between two character values

or these papers
- SOUNDEX -> http://support.sas.com/dsearch?qt=SOUNDEX+&ct=5240&Find=Search&col=suppprd&nh=10&qp=&qc=suppsas&ws=1...
- SPEDIS -> http://support.sas.com/dsearch?qt=SPEDIS+&ct=5240&Find=Search&col=suppprd&nh=10&qp=&qc=suppsas&ws=1&...

Please share your solution

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 845 views
  • 0 likes
  • 2 in conversation