DATA Step, Macro, Functions and more

point option in set statement in fuzzy merge code

Accepted Solution Solved
Reply
Regular Contributor
Posts: 234
Accepted Solution

point option in set statement in fuzzy merge code

This code I am using in my situation was taken from (http://blogs.sas.com/content/sgf/2015/01/27/how-to-perform-a-fuzzy-match-using-sas-functions/).  Usually, the point option is coupled with stop to prevent infinite looping. I am not sure why stop statment is not used here.

data test;
	set dsn1;
	tmp1=soundex(name1);

	do i=1 to nobs;
		set dsn2 point=i nobs=nobs;
		tmp2=soundex(name2);
		dif=compged(tmp1,tmp2);

		if dif<=50 then
			do;
				possible_match='Yes';
				drop i tmp1 tmp2;
				output;
			end;
	end;
run;

Accepted Solutions
Solution
‎02-01-2016 01:28 PM
Super User
Posts: 5,093

Re: point option in set statement in fuzzy merge code

That's true, STOP is usually employed in combination with POINT=.  In this case, however, SET DSN1 will eventually run out of observations to read, stopping the DATA step.

View solution in original post


All Replies
Solution
‎02-01-2016 01:28 PM
Super User
Posts: 5,093

Re: point option in set statement in fuzzy merge code

That's true, STOP is usually employed in combination with POINT=.  In this case, however, SET DSN1 will eventually run out of observations to read, stopping the DATA step.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

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