I have two variables named MNEMONIC and Details. I need to compare values in these variables and find out if replacing Mnemonic with Details creates value.
I'm using COMPGED to compare these variables as below
GED_SCORE = COMPGED(UPCASE(STRIP(COMPRESS(MNEMONIC,' :_/\-'))) ,
UPCASE(STRIP(COMPRESS(DETAILS,' :_/\-')))) ;
And have written few conditions to remove records which doesnt fetch me any value if I replace MNEMONIC with Details
IF GED_SCORE = 0 THEN DELETE ;
IF GED_SCORE < 35 THEN DELETE ;
Could anyone please suggest better way of doing this ?
Sample Dataset: { Edited }
Mnemonic Details
ABC:Test_Admin All Britain Corp Test Admin User
ESPC East Special Port Center
Memo Memo by post
Green_Card_holder Green Card Holder
Replacing Mnemonic with Details for 1st and 2nd records create high value ; For 3rd value provided is average and for last replace doesn't provide any value as it is the same words replaced by special characters.
There are about 2 millions of records and just for performance reasons I don't want to replace all of them. Hope this helps.
{ Edited }
Main reason for doing this fuzzy_logic is to save space.
It would help if you provided an example dataset.
Art, CEO, AnalystFinder.com
Thank you for your response, Tried giving a small 5 records dataset as example.
Not sure what we can suggest, you haven't told us anything other than you have that line of code. If it works then good. I can certainly suggest not coding all in uppercase as it makes it virtually unreadable.
What are you trying to accomplish? Are you trying to save space, combine similar "details", or something else?
Art, CEO, AnalystFinder.com
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.
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.