BookmarkSubscribeRSS Feed
malena
Calcite | Level 5

I am doing literal searches for several variables for specific terms.

 

One of these variables contains a description of up to 100 terms. So I am doing a search on this variable for a specific term: One of these terms is "OD". But I do not want to count them if the terms are "probable OD" or "suspected OD".

 

I am using these 2 functions: findw and index, are these any other better functions to use?

thanks!

2 REPLIES 2
mkeintz
PROC Star
Please show example, using a starting SAS data set, and the desired result.
--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
Reeza
Super User

PRXMATCH, which is regular expressions. They're incredibly powerful for searching text strings. 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 785 views
  • 0 likes
  • 3 in conversation