When looking for data contained in a character string of 150
bytes, which function is the best to locate that data: scan,
index, or indexc?
Answer Posted / jothi sankar
INDEX is best one. Is for getting location of mentioned
data.
Eg:
str1 = 'Hi i am fine here. how are u there ? .....';
str2 = index(str1,'how'); --> str2 = 20
SCAN is to get a substring upto mentioned character
INDEXC to locate only for mentioned one or more single
character
Is This Answer Correct ? | 5 Yes | 5 No |
Post New Answer View All Answers
How will you react when, while consulting a SAS documentation manual to get an answer to a problem, someone says hey, I thought you were supposed to know all that stuff already, and not have to look it up in a book?
what are informats in sas? : Sas-administrator
How many data types are there in SAS?
Give an example where SAS fails to convert character value to numeric value automatically?
How does proc sql work?
What are the five ways to do a table lookup in sas? : sas-grid-administration
If you need the value of a variable rather than the variable itself what would you use to load the value to a macro variable? : sas-macro
What can you learn from the SAS log when debugging?
Differences between where and if statement?
what are all the reports you generated in your recent project?
How will you use the WHO Drug Dictionary for Reporting Clinical Trials?
What areas of SAS are you most interested in?
what are sas bi dashboard components? : Sas-bi
where to use sas business intelligence? : Sas-bi
What do you code to create a macro? : sas-macro