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
What is the difference between match merge and one to one merge?
what is hierarchy flattening? : Sas-di
what is slowly changing dimension? : Sas-di
what do the mod and int function do? What do the pad and dim functions do? : Sas programming
What is maximum storage capability of SAS?
how do you want missing values handled? : Sas programming
Which function is used to count the number of intervals between two sas dates?
what are the benefits of data integration? : Sas-di
How will you react when, while consulting a SAS documentation manual to get an answer to a problem, someone says hey, I thought you were supposed to know all that stuff already, and not have to look it up in a book?
How do you test for missing values?
describe the interaction table in sas di? : Sas-di
where are dashboard components are created and maintained? : Sas-bi
Can you explain the process of calendar?
What is the command used to find missing values?
What is the basic syntax of a sas program?