Wildcard "if" statement in SAS

How do I check a field in SAS equal to anything with the word "Parent" or "p_"  in the field?
moriniaAdvanced Analytics AnalystAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

giltjrCommented:
Not sure about anywhere, but

IF (NAME = :"STR" )

Will match if the field name starts with STR.  I'm not sure you can do something like:

IF (NAME = :"STR":) if it would match if the field name contains "STR" anyplace.
moriniaAdvanced Analytics AnalystAuthor Commented:
The above solution did not work.
moriniaAdvanced Analytics AnalystAuthor Commented:
I was able to use substring to check for the first csix characters.  I can;t figure out how to check if unknown as to where in the string a particualr subset is.
Need More Insight Into What’s Killing Your Network

Flow data analysis from SolarWinds NetFlow Traffic Analyzer (NTA), along with Network Performance Monitor (NPM), can give you deeper visibility into your network’s traffic.

bradanelsonCommented:
IF INDEX(fieldname,'Parent') or INDEX(fieldname,'p_') THEN ...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
moriniaAdvanced Analytics AnalystAuthor Commented:
Bradanelson,

Is index being set in a loop?
bradanelsonCommented:
I don't understand your last question.  The IF statement I gave will be true if Parent or p_ is anywhere in the value of fieldname.  Replace fieldname with your field and add the statement or statements after the THEN in your code.
moriniaAdvanced Analytics AnalystAuthor Commented:
It worked fine!!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.