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

what are some good sas programming practices for processing very large data sets? : Sas programming

507


What is a pdv and what are its functions?

598


why is a stop statement needed for the point=option on a set statement? : Sas programming

583


Explain substr function?

572


What is the difference between proportion and average?

2753






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

573


What is the difference between match merge and one to one merge?

688


Name and describe few sas character functions that are used for data cleaning in brief.

662


how could you generate test data with no input data? : Sas programming

620


I have a dataset concat having a variable a b & c. How to rename a b to e & f?

755


Mention the category in which sas informats are placed?

624


i want for interview question & answer plz it need immediate send t my mail raviprakashmot@gmal.cm

1842


Explain the purpose of substr functions in sas programming.

561


For clinical entire study how many tables will create approx?

1520


What is the difference between reading data from an external file and reading data from an existing data set?

632