Write a SAS macro to calculate number of numbers in an
email address
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / naresh
Use compress function and remove characters and special characters then you will get digits.. Now find the length of the string...
Is This Answer Correct ? | 0 Yes | 0 No |
% let A=3+4 what is result
Can you execute macro within another macro? : sas-macro
Can you execute a macro within a macro? Describe. : sas-macro
How to create an external dataset with sas code?
what are sas bi dashboard components? : Sas-bi
How sas treats the dsd delimiters?
how to generate the test data in sas without input data? : Sas-administrator
Can we replace a dataset into view?
what is the difference between proc report and proc format?
What is Linear Regression?
What is by-group processing?
how can u convert this 25-jul-2010 from numeric to charcter?