Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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 the use of proc glm

1 Answers   Accenture, C Marc,


There is a river notoriously known for it?s large crocodile population. With ease, how do you safely cross it?

1 Answers   Oracle,


How might you use MOD and INT on numeric to mimic SUBSTR on character Strings?

1 Answers  


How to read an input file in sas?

1 Answers  


Explain the difference between informat and format with an example.

1 Answers  


What are _numeric_ and _character_ and what do they do?

1 Answers   Quintiles,


What is the difference between %local and %global? : sas-macro

1 Answers  


what is the difference btw proc means and proc univariate?

8 Answers   HSBC, TCS,


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

1 Answers  


How do you write a test plan?

1 Answers   Oracle,


How does SAS handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, PROCs?

1 Answers   Quintiles,


what is sas olap server? : Sas-di

1 Answers  


Categories