Difference Between Scan and Substr

Answer Posted / yachna

There is only one difference between Scan & Substr..Just look at below example

eg. String = rajesh chauhan
   If we want first four letter of the string then we can use Substr function here not scan..Scan function can pick first word.
  SubName=Substr(String,1,4);
  ScanName=Scan(String,1,' ');

      Subname = raje
      ScanName=rajesh

Is This Answer Correct ?    18 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Briefly explain input and put function?

837


i have a dataset with 100 obs i want to generate title from 20th obs onwards with total observations. that should contain 100 obs.dont use firstobs and dnt split the data. use dataset block or proc report? how can we genarate;

2181


what is sas application server, database server, sas olap server and sas metadata server? : Sas-di

767


what is the use of proc contents and proc print in sas? : Sas-administrator

832


how do you want missing values handled? : Sas programming

723


How to test the debugging in sas?

857


If you could design your ideal job, what would it look like?

2676


Which command is used to save logs in the external file?

803


what are the softwares and applications that are used most frequently used by sas bi applications developers? : Sas-bi

771


What is proc sort?

898


how do you debug and test your sas programs? : Sas programming

843


What is auto call macro and how to create a auto call macro? What is the use of it? How to use it in sas with macros? : sas-macro

772


what are _numeric_ and _character_ and what do they do? : Sas programming

885


where are dashboard components are created and maintained? : Sas-bi

786


In sas admin differentiate between roles and capabilities? : sas-grid-administration

768