Try removing the parentheses around the two findw conditions....it seems to work for me.
data T_USER_EMAIL; length userid $6 email $100; userid='ABC090'; email='john.smith@xyz.com'; output; userid='DEF090'; email='joanna.smythe@xyz.com'; output; userid='HIJ090'; email=' '; output; run; * test with Name; proc sql noprint; create table test_A1 as select * from T_USER_EMAIL where index(upcase(email),'@XYZ.COM') and (FINDW(" JOHN.SMITH xxx",strip(upcase(scan(email,1,'@'))),' ')) or (FINDW(" JOHN.SMITH xxx",strip(upcase(userid)))) ; quit; proc sql noprint; create table test_A2 as select * from T_USER_EMAIL where index(upcase(email),'@XYZ.COM') and (FINDW(" JOHN.SMITH xxx",strip(upcase(userid)))) or (FINDW(" JOHN.SMITH xxx",strip(upcase(scan(email,1,'@'))),' ')) ; quit; * test with UserId; proc sql noprint; create table test_B1 as select * from T_USER_EMAIL where index(upcase(email),'@XYZ.COM') and (FINDW("DEF090 xxx",strip(upcase(scan(email,1,'@'))),' ')) or (FINDW("DEF090 xxx",strip(upcase(userid)))) ; quit; proc sql noprint; create table test_B2 as select * from T_USER_EMAIL where index(upcase(email),'@XYZ.COM') and (FINDW("DEF090 xxx",strip(upcase(userid)))) or (FINDW("DEF090 xxx",strip(upcase(scan(email,1,'@'))),' ')) ; quit;
@aknight1: It's a veritable bug. This very example, verbatim, was posted on SAS-L a month or so ago by Roger DeAngelis and discussed and taken apart ad nauseam. And I believe that as a result of the consensus it's been already reported. Which doesn't mean that it will be fixed any time soon, particularly since it's pretty subtle and materializes only under very specific conditions.
Paul D.
It has now been fixed. See my Post from earlier today.
Sorry, I don't know.
Hi Tom ...
After speaking with SAS Tech Support this morning, now I have this information. The Hot-Fix that I gave the details for is ONLY for M3 and should not be applied for M4 or M5.
Further Hot-Fixes for M4 and M5 will be supplied soon, but there is no information on the exact date they will be available.
SAS told me that they did it this way because our Production Environment here is M3 and they wanted to resolve the reported Bug in our Production environment as priority.
Hope that's helpful,
Antony
@aknight1: I'm glad. And it only convinces me that it was reported much earlier than today.
@hashman wrote:
@aknight1: It's a veritable bug. This very example, verbatim, was posted on SAS-L a month or so ago by Roger DeAngelis and discussed and taken apart ad nauseam. And I believe that as a result of the consensus it's been already reported. Which doesn't mean that it will be fixed any time soon, particularly since it's pretty subtle and materializes only under very specific conditions.
Paul D.
This thread was started on 2018-07-13, which means 6 weeks ago. If you read this thread from the start, you will find that the bug was also reported to SAS TS on that day.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.