Write a SAS macro to calculate number of numbers in an
email address
Answers were Sorted based on User's Feedback
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 |
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 |
Which command is used to save logs in the external file?
How might you use MOD and INT on numeric to mimic SUBSTR on character Strings?
for whom is sas data integration studio designed? : Sas-di
what is function of retain statment
What is Tabulate.?Why we use it.? Which type of output we get from Tabulate.?
what is the difference between unique key and primary key? : Sas-di
What are the difficulties u faced while doing vital signs table or dataset?
I have a SCD Type 2 Dimention for Location In which A Sales Office in Having two Surrogate Keys just because of the change in it's Sales Group. SKey SalesGroup Sales Office BeginDate EndDate 280 SG1 SO1 01APR2000 01APR2010 281 SG2 SO1 02APR2010 31MAR2999 Now while loading the Fact, the Lookup ir returning SKey 280 for records before and after 01APR2010. I am not able to give WHERE condition in the Lookup Properties (TranDate between BeginDate and EndDate). Please help.
how to debug and test the sas program? : Sas-administrator
Are you involved in writing the inferential analysis plan? Tables specfications?
how do you want missing values handled? : Sas programming
What is the role of unrestrictive users? : sas-grid-administration