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 |
Mention sas system options to debug sas macros.
how do i read multiple spaces in datasets? eg: vijaya raghava perumal.I tried with using & but it workss if its vijaya raghava but not for raghava perumal.how to do this?
What are the 3 components in sas programming?
Difference b/n proc means and proc summary procedures?
What statement do you code to write the record to the file?
List down the reasons for choosing sas over other data analytics tools.
what are the different ways of merging two datasets.name atleast 4.
How to save the log information in a file for future use
what is business intelligence? : Sas-bi
The below code we are using for creating more than one macro variables in proc sql using into clause. How we can use same code to create macro variables vara, varb, varc instead of var1, var2, var3.? proc sql noprint; select count(distinct(patient)) into :var1 - :var3 from dataset1 group by trtreg1c ; quit;
how many data types in sas? : Sas-administrator
Mention what is SAS data set?