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 |
Explain the purpose of substr functions in sas programming.
if reading an external file to produce an external file, what is the shortcut to write that record without coding every single variable on the record
What would you change about your job?
How to import the Zip files into SAS? If it is possible in SAS? If it is posible write the code...
% let A=3+4 what is result
We have a string like this "kannafromsalembut" ,from this i want to get only "fromsal" (but one condition with out using substring function)here we can not use scan because in the given string there is no delimeter? so give ans without out using substring ?
If you’re not wanting any SAS output from a data step, how would you code the data statement to prevent SAS from producing a set?
how can u join the two tables without using proc sql Joins and nested queries ?
my problem is to export my report to xsl.i can do that.but the problem is my report has 3 headings first heading should be printed with the merging of (1-5)cells and heading 2 should be of merge(2-4)cells?how to do this condition?
for report generation which one you used proc report or data_null_?
3 Answers Accenture, Quintiles,
how to create the AE dataset by using SDTMIG specifications and SAP plan by using UNIX platform?
in data set200 observation how to take 110,150,170 using sql procedure?