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 |
what the use of proc glm
There is a river notoriously known for it?s large crocodile population. With ease, how do you safely cross it?
How might you use MOD and INT on numeric to mimic SUBSTR on character Strings?
How to read an input file in sas?
Explain the difference between informat and format with an example.
What are _numeric_ and _character_ and what do they do?
What is the difference between %local and %global? : sas-macro
what is the difference btw proc means and proc univariate?
Can you execute macro within another macro? : sas-macro
How do you write a test plan?
How does SAS handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, PROCs?
what is sas olap server? : Sas-di