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


Please Help Members By Posting Answers For Below Questions

Tell me about % include and % eval? : sas-macro

669


What is the difference between proportion and average?

2744


What sas features do you use to check errors and data validation?

670


How to specify variables to be processed by the freq procedure?

605


what is scheduling and how will u implement it. In scheduling 5 jobs r running if there is an error occured at 3rd job and how will u check and waht necessary steps will u take not to repeat the same mistake

1905






Mention what is the difference between nodupkey and nodup options?

583


What is the function of output statement in a SAS Program?

600


what is intially documentation in sas?

4315


I am preparing SAS Certified Advanced Programmer for SAS 9 in 2014. If anybody has the latest dumps for this exam, please mail me at dhiman.mukherjee@gmail.com

2257


What areas of SAS are you most interested in?

1050


What is the purpose of _character_ and _numeric_?

572


In proc transpose and data step with arrays which one you pick?

2563


What would be the value of month at the end of data step execution and how many observations would be there?

564


What are the parameters of scan function?

606


Is the physical structure of the data set in the same orientation as the report? Do you need to reshape the data sets? What method should you use to reshape the data–DATA steps,PROC TRANSPOSE,output data set from a procedure?

1760