BookmarkSubscribeRSS Feed
twildone
Pyrite | Level 9

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;
hashman
Ammonite | Level 13

@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.

aknight1
Obsidian | Level 7

It has now been fixed. See my Post from earlier today.

Tom
Super User Tom
Super User
Do you know if it is fixed in the latest release? The link you posted was for 9.4m3. What about 9.4m5?
aknight1
Obsidian | Level 7

Sorry, I don't know.

aknight1
Obsidian | Level 7

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

hashman
Ammonite | Level 13

@aknight1: I'm glad. And it only convinces me that it was reported much earlier than today. 

Kurt_Bremser
Super User

@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.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 22 replies
  • 2880 views
  • 14 likes
  • 9 in conversation