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 ?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / kumarravi123
One will get appreciate from our team members if u give
correct answer
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / ramkgupta
thank you abcds for correcting my small mistake.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / nagmani
data p;
input @6 x$ 7.;
cards;
kannafromsalembul
;
run;
| Is This Answer Correct ? | 0 Yes | 0 No |
what is SAS OPTIMIZATION?
How do you use the do loop if you don’t know how many times you should execute the do loop?
In which format does Date stores in sas..? What is the use of DATE in SAS.?
How do you connect the desktop application to metadata server? : sas-grid-administration
If you need the value of a variable rather than the variable itself what would you use to load the value to a macro variable?
libname deepak 'C:\SAS Files'; proc format; invalue convert 'A+' = 100 'A' = 96 'A-' = 92 'B+' = 88 'B' = 84 'B-' = 80 'C+' = 76 'C' = 72 'F' = 65; data deepak.grades; input ID $3. Grade convert.; *format Grade convert. ; datalines; 001 A- 002 B+ 003 F 004 C+ 005 A ; proc print data = deepak.grades; run; I get the following output Obs ID Grade 1 001 . 2 002 . 3 003 . 4 004 . 5 005 . I don’t understand why Grade shows up as a missing value. Everything seems fine, including ID $3. Now, in case I use ID : $3. Or use column input, I get the desired output. Kindly help Deepak
What areas of SAS are you most interested in?
What is the basic structure of the SAS base program?
Can you use a macro within another macro? If so how would SAS know where the current acro ended and the new one began?
Compare sas with other data analytics tools.
What is the purpose of the trailing @? The @@? How would you use them?
Does SAS ‘Translate’ (compile) or does it ‘Interpret’? Explain.