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 the frontend and backend of sas? Is sas is a progaming langauge or tool? on which langauge sas depends?
how does sas handle missing values in assignment statements? : Sas programming
what is Difference between PROC SQL JOINS and MERGE?
What is a put statement?
Hi, I have one dataset, could you please ans for this. id amount paid_amount 1 700 400 2 900 250 3 300 300 a 400 250 b 500 320 c 800 650 x 200 190 y 900 250 z 300 180 i want create new dataset having id and paid_amount who are paid high amount comparing amount. ex: 1d paid_amount 3 300 c 650 x 190
What do you know about sas and what we do? : sas-grid-administration
how will you locate the sas platform applications? : Sas-bi
How we can call macros with in data step? : sas-macro
data data1; input dt account; format dt date9.; cards; 1745 1230 1756 1120 1788 1130 1767 1240 ; data data2; input startdt enddt total; format startdt date9. enddt date9.; cards; 1657 1834 12300 1557 1758 16800 1789 1789 12300 1788 1345 12383 1899 1899 13250 ; proc sql; create table data3 as select * from data1 as x left join data2 as y on x.dt>=y.startdt and x.dt<=y.enddt; quit; Here, we are getting cartision product. But,I want left join report consisting of this program. It should not get duplicate values. you can modify the program also.
What is the role of administrative users? : sas-grid-administration
How do you add a number to a macro variable?
Are you involved in writing the inferential analysis plan? Tables specifications?