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 |
What is shift table? have you ever created shift that?
2 Answers Accenture, Clinical Research, Quintiles,
Can you execute a macro within a macro? Describe. : sas-macro
what do the mod and int function do? What do the pad and dim functions do? : Sas programming
how does sas handle missing values in an update? : Sas programming
what is study design in while working with SAS? what are screening variables in SAS?
explain the difference between proc means and proc summary?
what is washout period?
what is the frontend and backend of sas? Is sas is a progaming langauge or tool? on which langauge sas depends?
Why Info School? BUILD YOUR CAREER WITH RIGHT GUIDANCE AND SUPPORT
How would you define the end of a macro? : sas-macro
One way of creating a new variable in Macros is by % Let....What is the other way..?
What do you feel about hardcoding?