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
what are some differences between proc summary and proc means? : Sas programming
Can you suggest us materials for sdtm mapping?
How to sort in descending order?
How do you connect the desktop application to metadata server? : sas-grid-administration
I have a dataset concat having variable a b & c. How to rename a b to e & f?
What areas of SAS are you most interested in?
explain what is data set in sas? : Sas-administrator
how can you create zero observation dataset? : Sas programming
what is sas application server? : Sas-di
In proc transpose and data step with arrays which one you pick?
Give some ways by which you can define the variables to produce the summary report (using proc report)?
What is the difference between %local and %global? : sas-macro
how does sas handle missing values in procs? : Sas programming
explain about sas business intelligence? : Sas-bi
What is the function of output statement in a SAS Program?