That is very helping. Thanks , that partially solved my problem. Suppose, instead of a string, I have to apply it to a column, how we can go ahead with this code. By that, I mean, suppose instead of string, we have a dataframe with a specific column we are targetting , suppose -- "Apple summary". Then if you wanna find out 3 words before and after a keyword -"Apple", And create 2 columns with --3 WORDS BEFORE "apple" and 3 words after apple, then how you will go ahead. Sorry, I have limited understanding about SAS. Thanks again for quick reply.
... View more