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 is the difference between input and infile statement?
what is the difference between proc means and proc tabulate?
What system options would you use to help debug a macro? : sas-macro
What are the prime responsibilities of data integration administrator? : Sas-di
what is chi-square test? have you used that?
1 Answers Accenture, Quintiles,
Name statements that function at both compile and execution time.
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?
How would you determine the number of missing or nonmissing values in computations?
what are the different ways of merging two datasets.name atleast 4.
What is SAS? is it a software just for use or we can creat something over there?
how does sas handle missing values in functions? : Sas programming
what are the advantages of using SAS in clinical data mangement? why should not we use other software products in managing clinical data?