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 is intially documentation in sas?

1 Answers   Accenture,


How to create an external dataset with sas code?

0 Answers  


what is the difference between informat$8. $char8.

3 Answers   SAS,


Diff between proc sql merge and join?

1 Answers   HSBC, Sristek,


in the flow of data step processing, what is the first action in a typical data step? : Sas programming

0 Answers  


what is p-value

3 Answers   Accenture, Quintiles, Sristek,


Name validation tools used in SAS

0 Answers  


Does anybody has SAS Platform Administration certification dumps. pls send to hariithepalli@gmail.com

0 Answers  


WHAT IS DEBUGGING? HOW TO TEST THE DEBUGGING IN SAS?

3 Answers   Accenture,


Given an unsorted data set, how to read the last observation to a new data set?

0 Answers  


what is the difference between proc report and proc format?

7 Answers   CTS,


what is the difference between %put and symbolgen?

6 Answers  


Categories