We have a string like this "kannafromsalembut" ,from this i
want to get only "fromsal" (but one condition with out
using substring function)here we can not use scan because in
the given string there is no delimeter? so give ans without
out using substring ?

Answer Posted / abcds

data _null_;
file print;
tranw = tranwrd('kannafromsalembut','kanna',' ');
tranw1 = tranwrd(tranw,'embut',' ');
tranw2 = strip(tranw1);
put tranw2= ;
run;
this is the correct one.

Is This Answer Correct ?    7 Yes 0 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?

693


what is sas and what are the functions? : Sas-administrator

542


Explain append procedure?

636


What are the functions which are used for character handling functions?

620


how does sas handle missing values in a merge? : Sas programming

554






what are the component of range? : Sas-bi

616


What is the difference between order and group variable in proc report?

841


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

762


What is the purpose of _character_ and _numeric_?

589


sas implementing companies in pune implementing clinical projects if anyone knows plz send ans immediately

3111


What is the length assigned to the target variable by the scan function?

676


Do you need to rearrange the order of the data for the report?

1837


what is enterprise guide? What is the use of it? : Sas programming

538


What are the uses of sas?

709


how to change the execute of macro

1676