Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


Write a SAS macro to calculate number of numbers in an
email address

Answers were Sorted based on User's Feedback



Write a SAS macro to calculate number of numbers in an email address..

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

Write a SAS macro to calculate number of numbers in an email address..

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

Post New Answer

More SAS Interview Questions

what other SAS features do you use for error trapping and data validation?

3 Answers   Quintiles,


What SAS statements would you code to read an external raw data file to a DATA step?

10 Answers   NIIT,


Tell me more about the parameters in macro? : sas-macro

0 Answers  


What areas of SAS are you most interested in?

0 Answers   Quintiles,


What has been your most common programming mistake?

4 Answers   Wipro,






What are the prime responsibilities of data integration administrator? : Sas-di

0 Answers  


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

0 Answers   Accenture, Quintiles,


Which is the Best SAS training Institute in Delhi NCR for SAS certification preparation

1 Answers   SAS,


is data integration and etl programming is same? : Sas-di

0 Answers  


What is the work of tranwrd function?

0 Answers  


Code a PROC MEANS that shows both summed and averaged output of the data.

5 Answers  


how does sas handle missing values in procs? : Sas programming

0 Answers  






Categories