Difference Between Scan and Substr
Answers were Sorted based on User's Feedback
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 |
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 |
what is conditional processing?
Why is a STOP statement needed for the point=option on a SET statement?
How do you download a flat file from Mainframe to your local PC using SAS?
How to convert HTML file into SAS dataset?
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;
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?
Describe the function and utility of the most difficult SAS macro that you have written?
How would you keep from overlaying the a SAS set with its sorted version?
what are the categories that sas informats are used to the place the data? : Sas-administrator
What are the default statistics that proc means produce?
What are pdv and it functions?
how does sas handle missing values in assignment statements? : Sas programming