I'm a bit of a novice, but is there a SAS function that is able to interrogate a long text string and detect for specific patterns. For example, I am trying to find to most common occurrence of a the same pattern of 3 letters. For example, 'XYZ' appears 5 times in the 1st obs and 'ABC' appears 3 times in the 2nd obs. I was thinking a do loop with an iterative index script might work, but I can't seem to get it right. Appreciate any help for a newbie. DATA &ODSN1; INFILE DATALINES TRUNCOVER; INPUT DNA_STR $85. ; DATALINES; CGGAGGACXYZTCTAGGTAXYZACGCTTATCAGXYZGTCCATAGGACATXYZTCG123CTCTAGGXYZGAATCAGGTGCT12TC CGGA456CABCTCTAGGTAABCACGCTTATCAG123GTCCATAGGACATXYZTCGGAACTCTAGGABCGAATCAG987CTTATC ; RUN;
... View more