Write a SAS macro to calculate number of numbers in an
email address
Answer Posted / dey
%macro logic(email=);
data _null_;
length EMAIL $50;
Email=&email;
retain count 0;
do i = 1 to length(EMAIL);
if missing(substr(EMAIL,i,1)*1)=0 then
COUNT= COUNT +1;
end;
call symput('count',count);
RUN;
%put &count;
%mend logic;
%logic(email='dey_anurup123444@yahoo.12co.in')
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What makes sas stand out to be the best over other data analytics tools?
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;
If you have a dataset that contains 100 variables, but you need only five of those, what is the code to force SAS to use only those variables?
To what type of programms have you used scratch macros?
What is the difference between the proc sql and data step?
Explain the purpose of substr functions in sas programming.
How to test the debugging in sas?
describe about physical data integration? : Sas-di
State the difference between INFORMAT and FORMAT ?
Can you execute a macro within a macro? Describe. : sas-macro
Which command is used to perform sorting in sas program?
Which are the statements whose placement in the data step is critical?
How do you specify the number of iterations and specific condition within a single do loop?
How you can read the variables that you need?
what can you learn from the sas log when debugging? : Sas programming