Answer Posted / nani
%macro add(a,b);
%if (%datatyp(&a)=NUMERIC and %datatyp(&b)=NUMERIC) %then %
do;
%put The result is %sysevalf(&a+&b).;
%end;
%else %do;
%put Error: Addition requires numbers.;
%end;
%mend add;
You can invoke the ADD macro as:
%add(5.1E2,225)
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is the role of unrestrictive users? : sas-grid-administration
I need level 2 to 5 sas using companies in india
In ARRAY processing, what does the DIM function do?
what are sas bi dashboard components? : Sas-bi
how the sas basic syntax style described? : Sas-administrator
how can you create zero observation dataset? : Sas programming
Are you involved in writing the inferential analysis plan? Tables specfications?
how would you create multiple observations from a single observation? : Sas programming
what does the run statement do? : Sas programming
Will it bother you if the guy at the next desk times the frequency and duration of your bathroom or coffee breaks on the grounds that ?you are getting paid twice as much as he is??
What are the default statistics that proc means produce?
is data integration and etl programming is same? : Sas-di
What are the different types of sas functions?
What is the work of tranwrd function?
i have a dataset with 100 obs i want to generate title from 20th obs onwards with total observations. that should contain 100 obs.dont use firstobs and dnt split the data. use dataset block or proc report? how can we genarate;