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

what is the limit of the number of the rows and columns available in the worksheet? : Sas-bi

634


What is the difference between nodupkey and nodup options?

598


What is interleaving in SAS?

678


In ARRAY processing, what does the DIM function do?

713


What does PROC print, and PROC contents do?

730






Do we follow ADAM in analysis dataset development?How? Usually which version? Why is it necessary?

1916


how to create the AE dataset by using SDTMIG specifications and SAP plan by using UNIX platform?

2293


What do the sas log messages “numeric values have been converted to character” mean? What are the implications?

730


what are sas/access and sas/connect? : Sas programming

548


Difference between nodup and nodupkey options?

636


What system options would you use to help debug a macro? : sas-macro

642


Can you execute macro within another macro? : sas-macro

532


explain about sas business intelligence? : Sas-bi

598


If a variable contains only numbers, can it be a character data type?

616


What are the limitations for memory allocation for SAS variables

934