BookmarkSubscribeRSS Feed
sameer112217
Quartz | Level 8


proc dqmatch data = sample out = cluster_out (compress=yes) matchcode=match_cd
cluster = cluster_id;
criteria condition = 1 var = FULL_NAME matchdef='Name India' sensitivity=85;
criteria condition = 1 var = ENGINENO_5 matchdef='Text' sensitivity=95;
criteria condition = 1 var = CHASSISNO_5 matchdef='Text' sensitivity=95;

 

When I am running this code, the second var engineno_5 qne chassino_5 has blank values and in sas dqmatch it is grouping in the same cluster if there is a match with just one condition of full_name. I need a code where it has to match all the three conditions to group it in the same cluster. In Dataflax the blank or null value is not considered.

1 REPLY 1
ballardw
Super User

@sameer112217 wrote:


proc dqmatch data = sample out = cluster_out (compress=yes) matchcode=match_cd
cluster = cluster_id;
criteria condition = 1 var = FULL_NAME matchdef='Name India' sensitivity=85;
criteria condition = 1 var = ENGINENO_5 matchdef='Text' sensitivity=95;
criteria condition = 1 var = CHASSISNO_5 matchdef='Text' sensitivity=95;

 

When I am running this code, the second var engineno_5 qne chassino_5 has blank values and in sas dqmatch it is grouping in the same cluster if there is a match with just one condition of full_name. I need a code where it has to match all the three conditions to group it in the same cluster. In Dataflax the blank or null value is not considered.


I don't have any actual experience with this procedure but from the documentation on the CRITERIA statement

EXACT | MATCHDEF=

assigns a cluster number.

EXACT

assigns a cluster number based on an exact character match between values.

Restriction If you specify the EXACT= option, you cannot specify the MATCHDEF= option, the MATCHCODE= option, or the SENSITIVITY= option.

MATCHDEF=match-definition

specifies the match-definition that is used to create the match code for the specified variable.

Restrictions The match-definition must exist in the locale that is specified in the LOCALE= option of the DQMATCH procedure.
If you specify the MATCHDEF= option, you cannot specify the EXACT option, the MATCHCODE= option, or the SENSITIVITY option.

(some emphasis added)

 

it appears that you need to rethink the condtions as MATCHDEF and SENSITIVITY apparently are incompatible. I would check your log for any notes about one or more of the options being ignored or similar.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

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