I have five diferent words that can have up to five different abreviations that I need to search in String1. Here is an example of 2 of those words that I am searching for: <Inside a Data Step> IndexFixed = Index(UpCase(String1), 'FIXED'); If Index(UpCase(String1), 'FIXED') > 0 Then Word1 = 'FIXED'; If Index(UpCase(String1), 'FIXD') > 0 Then Word1 = 'FIXD'; If Index(UpCase(String1), 'FXD') > 0 Then Word1 = 'FXD'; If Not Missing(Word1) Then Pos1 = FINDW(String1, Word1,' ','I E'); If Index(UpCase(String1), 'PMT') > 0 Then Word2 = 'PMT'; If Index(UpCase(String1), 'PYMNT') > 0 Then Word2 = 'PYMNT'; If Index(UpCase(String1), 'PMNT') > 0 Then Word2 = 'PMNT'; If Index(UpCase(String1), 'PAY') > 0 Then Word2 = 'PAY'; If Index(UpCase(String1), 'PMNT') > 0 Then Word2 = 'PAYMT'; If Index(UpCase(String1), 'PAYMENT') > 0 Then Word2 = 'PAYMENT'; If Not Missing(Word2) Then Pos2 = FINDW(String2, Word2,' ','E I'); This is repeated for the other 3 words and their abreviations. I am finding that only one of the FINDW generated a number to be run. (Pos1-Pos5 only have on value with a number while the other four are zero). Word1 Word2 Word3 Word4 Word5 Pos1 Pos2 Pos3 Pos4 Pos5 FIXED PAY PROG APPR 0 0 8 0 0 Why does FINDW only work once for a given observation? Thank you for your help.
... View more