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
Give an example where SAS fails to convert character value to numeric value automatically?
Mention what is the difference between nodupkey and nodup options?
What are the different versions of sas that you have used until now? : sas-grid-administration
how do you test for missing values? : Sas programming
how to read the variables in sas? : Sas-administrator
What do the SAS log messages "numeric values have been converted to character" mean?
What is factor analysis?
What do you understand by the term Normal Distribution?
How do you delete duplicate observations in sas?
how does sas handle missing values in assignment statements? : Sas programming
If you use a symput in a data step, when and where can you use the macro variable? : sas-macro
How would you determine the number of missing or nonmissing values in computations?
what is the difference between: x=a+b+c+d; and x=sum (of a, b, c ,d);? : Sas programming
Assuming {et} is randomly drawn from N(0,1) and e0 = 0, generate 200 observations of xt = et − 0.5e(t−1) and draw a line graph of xt.
what is the one statement to set the criteria of data that can be coded in any step? : Sas programming