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

What sas features do you use to check errors and data validation?

683


what is the function of catx syntax? : Sas-administrator

643


What is substr function?

622


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

548


Define run-group processing?

579






Have you ever used the SAS Debugger?

1203


Have you used macros? For what purpose you have used? : sas-macro

557


How you are maintaining sas programmes in your company...any specific version control software you are using? If so, tell me the name?

1578


: and & modifiers.

858


Explain data_null_?

607


how to create the AE dataset by using SDTMIG specifications and SAP plan by using UNIX platform?

2288


Hello Friends, am new to this forum and am not good at sas progarmming. please can any one of you send me couple of sample large sample SAS Jobs which can you use 200 MB of data and other sas job upto 25GB of data. am doing a performance testing on our legacy systems and new upgraded system. I would really appreciate if you can do me this favor Thank you Priya

1343


how do the in= variables improve the capability of a merge? : Sas programming

931


If money were no object, what would you like to do?

2684


What is the maximum length of the macro variable? : sas-macro

617