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 primary data source for the wrs? : Sas-bi
How do you specify the number of iterations and specific condition within a single do loop?
Differences between where and if statement?
What do you know about symput and symget?
How to include or exclude specific variables in a data set?
Tell me about % include and % eval? : sas-macro
What can be the size of largest dataset in SAS?
Intern stastical programmer written test
How you are maintaining sas programmes in your company...any specific version control software you are using? If so, tell me the name?
What is the good sas programming practices for processing large data sets?
How to create an external dataset with sas code?
explain about data integrator metadata reports? : Sas-di
What is the difference between where and if statement?
How do you debug and test your SAS programs?
What versions of SAS have you used (on which platforms)?