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


Please Help Members By Posting Answers For Below Questions

Are you involved in writing the inferential analysis plan? Tables specfications?

1844


Name validation tools used in SAS

802


what are the categories that sas informats are used to the place the data? : Sas-administrator

710


what cause the "error: connect:" and "error in the libname statement" when there weren't any such problems?

1805


What are types of transport files?

7156






Mention what is PROC in SAS?

718


Describe crosslist option in tables statement?

825


AE datasets names? how many types?

2151


what is data access? : Sas-di

743


What are the difficulties u faced while doing vital signs table or dataset?

2039


what are several options for creating reports in web report studio? : Sas-bi

733


How substr function works in sas?

786


what is business intelligence? : Sas-bi

677


What is program data vector (pdv)?

734


Differences between where and if statement?

684