Difference Between Scan and Substr

Answers were Sorted based on User's Feedback



Difference Between Scan and Substr..

Answer / 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

Difference Between Scan and Substr..

Answer / sudhir kumar

Both are function scan function Extracts nth position word
from string separated key dlm if n is -ve then starts at
end. and substr function extracts char string from start
position and with length .

Is This Answer Correct ?    9 Yes 0 No

Post New Answer

More SAS Interview Questions

hi tell be about pfizer? how to compare the work with other companies ? please tell me how to login and work also?

0 Answers   Pfizer,


Mention the category in which sas informats are placed?

0 Answers  


Which are the statements whose placement in the data step is critical?

0 Answers  


how to display duplicated observations in a data using base sas.

13 Answers   HCL, TCS,


What is the function of Stop statement in a SAS Program?

0 Answers  






how do we get duplicate observations in a separate dataset?

6 Answers   CitiGroup,


How will you assign all the variables of an dataset into a macro variable separated by a space? For example if a dataset has variables A,B,C. Assign them to a macro variable X as X=A B C

3 Answers   Accenture, Oracle,


sas implimented companies in hyderabad

11 Answers   CTS, HSBC,


i have a null dataset with 10 variables; i want to print only name of the varibales in log window and also output window.how can we do this one?

6 Answers   GSK,


How many versions came upto now in SAS?

3 Answers   CTS, TCS,


How would you code a merge that will write the matches of both to one data set, the non-matches from the left-most data set to a second data set, and the non-matches of the right-most data set to a third data set.

10 Answers   Accenture,


what is the use of sas management console? : Sas-di

0 Answers  


Categories