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.
@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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.