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 / ram kumar

data _null_;
file print;
tranw=tranwrd('kannafromsalembut','kanna',' ');
tranw1=tranwrd(tranw,'embut',' ');
tranw2=strip(tranw2);
put tranw2= ;
run;
this will give your required output. that is tranw2=fromsal.

Is This Answer Correct ?    11 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

explain the use of % includes a statement in sas? : Sas-administrator

549


Give some examples where proc report’s defaults are same as proc print’s defaults?

643


What do you code to create a macro? : sas-macro

582


Explain the main difference between the sas procedures and functions? : Sas-administrator

540


What is the difference between %put and symbolgen? : sas-macro

671






What is interleaving in SAS?

673


What do the put and input function do?

589


what is business intelligence? : Sas-bi

583


how does sas handle missing values in functions? : Sas programming

601


What is SAS?

621


how to generate the test data in sas without input data? : Sas-administrator

579


What are the different operating system platforms in which we can use sas? : sas-grid-administration

592


Explain data_null_?

609


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;

1973


What is the work of tranwrd function?

668